Make getFolder return '.' instead of empty string

This commit is contained in:
Jason Schutz 2021-08-12 15:37:10 -04:00 committed by K. S. Ernest (iFire) Lee
parent 2fe07994d1
commit 661c99c9cb
1 changed files with 2 additions and 1 deletions

View File

@ -50,7 +50,8 @@ inline bool FolderExists(const std::string& folderPath) {
}
inline std::string getFolder(const std::string& path) {
return boost::filesystem::path(path).parent_path().string();
auto parent = boost::filesystem::path(path).parent_path().string();
return parent == "" ? "." : parent;
}
inline std::string GetFileName(const std::string& path) {