From 661c99c9cbaeb1a053e80532d83db0c2d8f34303 Mon Sep 17 00:00:00 2001 From: Jason Schutz Date: Thu, 12 Aug 2021 15:37:10 -0400 Subject: [PATCH] Make getFolder return '.' instead of empty string --- src/utils/File_Utils.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/File_Utils.hpp b/src/utils/File_Utils.hpp index 7bd228d..ac1442e 100644 --- a/src/utils/File_Utils.hpp +++ b/src/utils/File_Utils.hpp @@ -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) {