Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Let's not CreateDir an empty string every time CreateFullPath is used…
…, logging an error every time.
  • Loading branch information
jordan-woyak committed Feb 17, 2013
1 parent 9ac2fbb commit 3330842
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Source/Core/Common/Src/FileUtil.cpp
Expand Up @@ -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);

Expand Down

0 comments on commit 3330842

Please sign in to comment.