From c658b81639716c151e32003ec14ece0753cd4658 Mon Sep 17 00:00:00 2001 From: Michael Jackson Date: Mon, 13 Nov 2023 11:40:42 -0500 Subject: [PATCH] Fix runtime exception when parent file path is empty. Signed-off-by: Michael Jackson --- src/complex/Utilities/Parsing/HDF5/Writers/FileWriter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/complex/Utilities/Parsing/HDF5/Writers/FileWriter.cpp b/src/complex/Utilities/Parsing/HDF5/Writers/FileWriter.cpp index 7b13afdf3b..7b4f89e945 100644 --- a/src/complex/Utilities/Parsing/HDF5/Writers/FileWriter.cpp +++ b/src/complex/Utilities/Parsing/HDF5/Writers/FileWriter.cpp @@ -13,7 +13,7 @@ Result FileWriter::CreateFile(const std::filesystem::path& filepath) auto parentPath = filepath.parent_path(); try { - if(!std::filesystem::exists(parentPath)) + if(!parentPath.empty() && !std::filesystem::exists(parentPath)) { if(!std::filesystem::create_directories(parentPath)) {