Let's not CreateDir an empty string every time CreateFullPath is used, logging an error every time.

This commit is contained in:
Jordan Woyak 2013-02-17 01:33:22 -06:00
parent 9ac2fbb0a5
commit 3330842505
1 changed files with 3 additions and 2 deletions

View File

@ -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);