diff options
| author | Jordan Woyak <jordan.woyak@gmail.com> | 2013-02-17 01:33:22 -0600 |
|---|---|---|
| committer | Jordan Woyak <jordan.woyak@gmail.com> | 2013-02-17 01:33:22 -0600 |
| commit | 333084250591d0cd2e88ebdb722a36003c2ae213 (patch) | |
| tree | 77c29b7e07983efa0c4f2d9834d9f963e904f9ba /Source/Core/Common/Src/FileUtil.cpp | |
| parent | 9ac2fbb0a5f0af21a2a539a7655cfa7e15801ab1 (diff) | |
Let's not CreateDir an empty string every time CreateFullPath is used, logging an error every time.
Diffstat (limited to 'Source/Core/Common/Src/FileUtil.cpp')
| -rw-r--r-- | Source/Core/Common/Src/FileUtil.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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); |
