From: Zeg9 Date: Fri, 12 Apr 2013 10:58:04 +0000 (+0200) Subject: Fix serverlist on -DRUN_IN_PLACE=0 (use path_user instead of path_share) X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=c33b99339788995a31cb3f652a9ffe8f7270b061;p=zefram%2Fminetest%2Fminetest_engine.git Fix serverlist on -DRUN_IN_PLACE=0 (use path_user instead of path_share) --- diff --git a/src/serverlist.cpp b/src/serverlist.cpp index 93f9d243..7053436d 100644 --- a/src/serverlist.cpp +++ b/src/serverlist.cpp @@ -38,10 +38,12 @@ std::string getFilePath() { std::string serverlist_file = g_settings->get("serverlist_file"); - std::string rel_path = std::string("client") + DIR_DELIM - + "serverlist" + DIR_DELIM - + serverlist_file; - std::string path = porting::path_share + DIR_DELIM + rel_path; + std::string dir_path = std::string("client") + DIR_DELIM + + "serverlist" + DIR_DELIM; + fs::CreateDir(porting::path_user + DIR_DELIM + "client"); + fs::CreateDir(porting::path_user + DIR_DELIM + dir_path); + std::string rel_path = dir_path + serverlist_file; + std::string path = porting::path_user + DIR_DELIM + rel_path; return path; }