]> git.lizzy.rs Git - minetest.git/blobdiff - src/filesys.cpp
Workaround for blocks having a huge amount of active objects; add log messages relate...
[minetest.git] / src / filesys.cpp
index 8248a13d46f3703c48061faa68f3b2e150289f8e..99a0a6ef882b710a43b9f6cf1215fd8706e6810b 100644 (file)
@@ -28,7 +28,7 @@ namespace fs
 #ifdef _WIN32 // WINDOWS
 
 #define _WIN32_WINNT 0x0501
-#include <Windows.h>
+#include <windows.h>
 #include <stdio.h>
 #include <malloc.h>
 #include <tchar.h> 
@@ -254,7 +254,7 @@ bool RecursiveDelete(std::string path)
                execv(argv[0], argv);
                
                // Execv shouldn't return. Failed.
-               return false;
+               _exit(1);
        }
        else
        {
@@ -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);