summaryrefslogtreecommitdiff
path: root/src/filesys.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-10-16 16:16:47 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-10-16 16:16:47 +0300
commit67a6bc4ab5be607c4a9f9a349dee629e864c2d42 (patch)
treea07c396e114a21ccfede1bd9cd28470e1bd178b3 /src/filesys.cpp
parentef397dca7c4adb4216e5063a01a487889bf28abd (diff)
downloadminetest-67a6bc4ab5be607c4a9f9a349dee629e864c2d42.tar.gz
minetest-67a6bc4ab5be607c4a9f9a349dee629e864c2d42.tar.bz2
minetest-67a6bc4ab5be607c4a9f9a349dee629e864c2d42.zip
Fix map delete on windows (concatenate paths correctly with / or \ depending on OS)
Diffstat (limited to 'src/filesys.cpp')
-rw-r--r--src/filesys.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/filesys.cpp b/src/filesys.cpp
index 8aa10ba58..99a0a6ef8 100644
--- a/src/filesys.cpp
+++ b/src/filesys.cpp
@@ -279,7 +279,7 @@ bool RecursiveDeleteContent(std::string path)
{
if(trim(list[i].name) == "." || trim(list[i].name) == "..")
continue;
- std::string childpath = path + "/" + list[i].name;
+ std::string childpath = path + DIR_DELIM + list[i].name;
bool r = RecursiveDelete(childpath);
if(r == false)
{
@@ -299,7 +299,7 @@ bool CreateAllDirs(std::string path)
while(!PathExists(basepath))
{
tocreate.push_back(basepath);
- pos = basepath.rfind('/');
+ pos = basepath.rfind(DIR_DELIM_C);
if(pos == std::string::npos)
return false;
basepath = basepath.substr(0,pos);