mail[Wesnoth-commits] r34014 - /branches/1.6/src/filesystem.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by df on March 22, 2009 - 05:07:
Author: dfranke
Date: Sun Mar 22 05:07:34 2009
New Revision: 34014

URL: http://svn.gna.org/viewcvs/wesnoth?rev=34014&view=rev
Log:
Fix 'Trying to open file with empty name' stdout spam in MP lobby

Modified:
    branches/1.6/src/filesystem.cpp

Modified: branches/1.6/src/filesystem.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/1.6/src/filesystem.cpp?rev=34014&r1=34013&r2=34014&view=diff
==============================================================================
--- branches/1.6/src/filesystem.cpp (original)
+++ branches/1.6/src/filesystem.cpp Sun Mar 22 05:07:34 2009
@@ -680,7 +680,9 @@
 
 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);




Related Messages


Powered by MHonArc, Updated Sun Mar 22 05:20:41 2009