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

@ -197,7 +197,8 @@ bool CreateFullPath(const std::string &fullPath)
if (position == fullPath.npos) if (position == fullPath.npos)
return true; 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)) if (!File::IsDirectory(subPath))
File::CreateDir(subPath); File::CreateDir(subPath);