X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Ffilesys.cpp;h=b95986a92bcc9f880a412d1703441ea8549d85b8;hb=58e6d25e033c76dc91aaac18fdeda92ac23fe0e1;hp=356d3018deff2843816f19a87e486479240efa85;hpb=2ed3067bbed9844b434b53fb9cacb870e6ca97ea;p=oweals%2Fminetest.git diff --git a/src/filesys.cpp b/src/filesys.cpp index 356d3018d..b95986a92 100644 --- a/src/filesys.cpp +++ b/src/filesys.cpp @@ -18,12 +18,14 @@ with this program; if not, write to the Free Software Foundation, Inc., */ #include "filesys.h" -#include "strfnd.h" +#include "util/string.h" #include #include #include #include +#include #include "log.h" +#include "config.h" namespace fs { @@ -33,8 +35,8 @@ namespace fs #define _WIN32_WINNT 0x0501 #include #include -#include -#include +#include +#include #define BUFSIZE MAX_PATH @@ -72,12 +74,12 @@ std::vector GetDirListing(std::string pathstring) // Find the first file in the directory. hFind = FindFirstFile(DirSpec, &FindFileData); - if (hFind == INVALID_HANDLE_VALUE) + if (hFind == INVALID_HANDLE_VALUE) { retval = (-1); goto Cleanup; - } - else + } + else { // NOTE: // Be very sure to not include '..' in the results, it will @@ -90,7 +92,7 @@ std::vector GetDirListing(std::string pathstring) listing.push_back(node); // List all the other files in the directory. - while (FindNextFile(hFind, &FindFileData) != 0) + while (FindNextFile(hFind, &FindFileData) != 0) { DirListNode node; node.name = FindFileData.cFileName; @@ -101,7 +103,7 @@ std::vector GetDirListing(std::string pathstring) dwError = GetLastError(); FindClose(hFind); - if (dwError != ERROR_NO_MORE_FILES) + if (dwError != ERROR_NO_MORE_FILES) { errorstream<<"GetDirListing: FindNextFile error. Error is " <