diff --git a/changelog.md b/changelog.md index b40c37d0b702..3e5409f67d4f 100644 --- a/changelog.md +++ b/changelog.md @@ -249,6 +249,7 @@ * Fixed Lua errors when setting a music track that cannot be found when the playlist is already empty, e.g. if there's no music installed for the game (issue #3194). + * Fixed [scenario] map_file= being unusable in most circumstances. ## Version 1.13.12 ### Security fixes diff --git a/src/filesystem_common.cpp b/src/filesystem_common.cpp index ff767d5bbba3..35cdb0c995dc 100644 --- a/src/filesystem_common.cpp +++ b/src/filesystem_common.cpp @@ -138,12 +138,14 @@ bool ends_with(const std::string& str, const std::string& suffix) std::string read_map(const std::string& name) { std::string res; - std::string map_location = get_wml_location("maps/" + name); + std::string map_location = get_wml_location(name); if(!map_location.empty()) { res = read_file(map_location); } - if (res.empty()) { + // TODO: might be nice to have automatic detection of the maps/ directory? + + if(res.empty()) { res = read_file(get_user_data_dir() + "/editor/maps/" + name); }