aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZeg9 <dazeg9@gmail.com>2013-04-12 12:58:04 +0200
committerPilzAdam <pilzadam@minetest.net>2013-04-25 19:49:28 +0200
commitc33b99339788995a31cb3f652a9ffe8f7270b061 (patch)
tree5036c913b4b1c52ebbc3e00d87548cc6043f60f2 /src
parent88ffb3f73bb16c6680ee10a8e804a699e366edd8 (diff)
downloadminetest-c33b99339788995a31cb3f652a9ffe8f7270b061.tar.gz
minetest-c33b99339788995a31cb3f652a9ffe8f7270b061.tar.bz2
minetest-c33b99339788995a31cb3f652a9ffe8f7270b061.zip
Fix serverlist on -DRUN_IN_PLACE=0 (use path_user instead of path_share)
Diffstat (limited to 'src')
-rw-r--r--src/serverlist.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/serverlist.cpp b/src/serverlist.cpp
index 93f9d2435..7053436d0 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;
}