Skip to content

Commit c33b993

Browse files
Zeg9PilzAdam
authored andcommittedApr 25, 2013
Fix serverlist on -DRUN_IN_PLACE=0 (use path_user instead of path_share)
1 parent 88ffb3f commit c33b993

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed
 

‎src/serverlist.cpp

+6-4
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,12 @@ std::string getFilePath()
3838
{
3939
std::string serverlist_file = g_settings->get("serverlist_file");
4040

41-
std::string rel_path = std::string("client") + DIR_DELIM
42-
+ "serverlist" + DIR_DELIM
43-
+ serverlist_file;
44-
std::string path = porting::path_share + DIR_DELIM + rel_path;
41+
std::string dir_path = std::string("client") + DIR_DELIM
42+
+ "serverlist" + DIR_DELIM;
43+
fs::CreateDir(porting::path_user + DIR_DELIM + "client");
44+
fs::CreateDir(porting::path_user + DIR_DELIM + dir_path);
45+
std::string rel_path = dir_path + serverlist_file;
46+
std::string path = porting::path_user + DIR_DELIM + rel_path;
4547
return path;
4648
}
4749

0 commit comments

Comments
 (0)