Skip to content

Commit

Permalink
Fix runtime exception when parent file path is empty.
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Jackson <[email protected]>
  • Loading branch information
imikejackson committed Nov 13, 2023
1 parent 418e5bc commit 7ee5e7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/complex/Utilities/Parsing/HDF5/Writers/FileWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Result<FileWriter> 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))
{
Expand Down

0 comments on commit 7ee5e7b

Please sign in to comment.