diff options
author | Nate <palmern22@gmail.com> | 2018-08-13 00:47:38 +0200 |
---|---|---|
committer | peterbell10 <peterbell10@live.co.uk> | 2018-08-13 00:47:38 +0200 |
commit | 801d5d7170f15b6075cfbf15fa3fe5a074611a96 (patch) | |
tree | 26a6d0e6dad2bb58e4b71d9bd66ca6abd56fe68b /src/OSSupport | |
parent | cloc: Updated list of ignored files. (#4280) (diff) | |
download | cuberite-801d5d7170f15b6075cfbf15fa3fe5a074611a96.tar cuberite-801d5d7170f15b6075cfbf15fa3fe5a074611a96.tar.gz cuberite-801d5d7170f15b6075cfbf15fa3fe5a074611a96.tar.bz2 cuberite-801d5d7170f15b6075cfbf15fa3fe5a074611a96.tar.lz cuberite-801d5d7170f15b6075cfbf15fa3fe5a074611a96.tar.xz cuberite-801d5d7170f15b6075cfbf15fa3fe5a074611a96.tar.zst cuberite-801d5d7170f15b6075cfbf15fa3fe5a074611a96.zip |
Diffstat (limited to 'src/OSSupport')
-rw-r--r-- | src/OSSupport/File.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/OSSupport/File.cpp b/src/OSSupport/File.cpp index d9b3d86d3..3dd97f36c 100644 --- a/src/OSSupport/File.cpp +++ b/src/OSSupport/File.cpp @@ -474,10 +474,13 @@ bool cFile::CreateFolderRecursive(const AString & a_FolderPath) // Go through each path element and create the folder: auto len = a_FolderPath.length(); - auto PathSep = GetPathSeparator()[0]; for (decltype(len) i = 0; i < len; i++) { - if (a_FolderPath[i] == PathSep) + #ifdef _WIN32 + if ((a_FolderPath[i] == '\\') || (a_FolderPath[i] == '/')) + #else + if (a_FolderPath[i] == '/') + #endif { CreateFolder(a_FolderPath.substr(0, i)); } |