diff --git a/Source/Core/Common/Src/FileUtil.cpp b/Source/Core/Common/Src/FileUtil.cpp index d74c99b7a2..8e1bec2809 100644 --- a/Source/Core/Common/Src/FileUtil.cpp +++ b/Source/Core/Common/Src/FileUtil.cpp @@ -196,8 +196,9 @@ bool CreateFullPath(const std::string &fullPath) // we're done, yay! if (position == fullPath.npos) return true; - - std::string subPath = fullPath.substr(0, position); + + // Include the '/' so the first call is CreateDir("/") rather than CreateDir("") + std::string const subPath(fullPath.substr(0, position + 1)); if (!File::IsDirectory(subPath)) File::CreateDir(subPath);