Fix 'Trying to open file with empty name' stdout spam in MP lobby

This commit is contained in:
Daniel Franke 2009-03-22 04:09:56 +00:00
parent 1399c95cbd
commit a0b356fa5b

View file

@ -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);