aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-11-02 13:43:00 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-11-02 13:43:00 +0200
commit03db16d55b87908f2a08f9431162316d02e66233 (patch)
treecf590e219333cd5478ed854ac36cc3f67427cbdf
parent0c20973c17771155f40b6eaf9caba81204702e4e (diff)
downloadminetest-03db16d55b87908f2a08f9431162316d02e66233.tar.gz
minetest-03db16d55b87908f2a08f9431162316d02e66233.tar.bz2
minetest-03db16d55b87908f2a08f9431162316d02e66233.zip
Remove trailing / or \ in path_userdata (probably fixes world deletion on Windows)
-rw-r--r--src/porting.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/porting.cpp b/src/porting.cpp
index 217f0926e..f349c0ce5 100644
--- a/src/porting.cpp
+++ b/src/porting.cpp
@@ -129,8 +129,8 @@ void initializePaths()
// Use "./bin/../data"
path_data = std::string(buf) + DIR_DELIM ".." DIR_DELIM "data";
- // Use "./bin/../"
- path_userdata = std::string(buf) + DIR_DELIM ".." DIR_DELIM;
+ // Use "./bin/.."
+ path_userdata = std::string(buf) + DIR_DELIM "..";
/*
Linux
@@ -149,7 +149,7 @@ void initializePaths()
path_data = std::string(buf) + "/../data";
// Use "./bin/../"
- path_userdata = std::string(buf) + "/../";
+ path_userdata = std::string(buf) + "/..";
/*
OS X
@@ -160,7 +160,7 @@ void initializePaths()
dstream<<"WARNING: Relative path not properly supported on OS X and FreeBSD"
<<std::endl;
path_data = std::string("../data");
- path_userdata = std::string("../");
+ path_userdata = std::string("..");
#endif