[Base] Only attempt to create non-empty base paths in CreateParentFolder.

This commit is contained in:
gibbed 2019-07-18 18:32:04 -05:00
parent 706c810a3a
commit 887609ba44
1 changed files with 1 additions and 1 deletions

View File

@ -99,7 +99,7 @@ std::string CanonicalizePath(const std::string& original_path) {
bool CreateParentFolder(const std::wstring& path) { bool CreateParentFolder(const std::wstring& path) {
auto fixed_path = xe::fix_path_separators(path, xe::kWPathSeparator); auto fixed_path = xe::fix_path_separators(path, xe::kWPathSeparator);
auto base_path = xe::find_base_path(fixed_path, xe::kWPathSeparator); auto base_path = xe::find_base_path(fixed_path, xe::kWPathSeparator);
if (!PathExists(base_path)) { if (base_path.size() && !PathExists(base_path)) {
return CreateFolder(base_path); return CreateFolder(base_path);
} else { } else {
return true; return true;