From 67a6bc4ab5be607c4a9f9a349dee629e864c2d42 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sun, 16 Oct 2011 16:16:47 +0300 Subject: Fix map delete on windows (concatenate paths correctly with / or \ depending on OS) --- src/filesys.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/filesys.cpp') 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); -- cgit v1.2.3