Fix 'Trying to open file with empty name' stdout spam in MP lobby
This commit is contained in:
parent
1399c95cbd
commit
a0b356fa5b
1 changed files with 3 additions and 1 deletions
|
@ -680,7 +680,9 @@ void write_file(const std::string& fname, const std::string& data)
|
|||
|
||||
std::string read_map(const std::string& name)
|
||||
{
|
||||
std::string res = read_file(get_wml_location("maps/" + name));
|
||||
std::string res;
|
||||
std::string map_location = get_wml_location("maps/" + name);
|
||||
if(!map_location.empty()) res = read_file(map_location);
|
||||
|
||||
if (res.empty()) {
|
||||
res = read_file(get_user_data_dir() + "/editor/maps/" + name);
|
||||
|
|
Loading…
Add table
Reference in a new issue