Make getFolder return '.' instead of empty string
This commit is contained in:
parent
2fe07994d1
commit
661c99c9cb
|
@ -50,7 +50,8 @@ inline bool FolderExists(const std::string& folderPath) {
|
||||||
}
|
}
|
||||||
|
|
||||||
inline std::string getFolder(const std::string& path) {
|
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) {
|
inline std::string GetFileName(const std::string& path) {
|
||||||
|
|
Loading…
Reference in New Issue