From a0b356fa5b4a3afa34b6e9c27cbec465c0db08a8 Mon Sep 17 00:00:00 2001 From: Daniel Franke Date: Sun, 22 Mar 2009 04:09:56 +0000 Subject: [PATCH] Fix 'Trying to open file with empty name' stdout spam in MP lobby --- src/filesystem.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/filesystem.cpp b/src/filesystem.cpp index bb6768de909..690564fd5d4 100644 --- a/src/filesystem.cpp +++ b/src/filesystem.cpp @@ -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);