Skip to content

Commit

Permalink
fix path creation
Browse files Browse the repository at this point in the history
  • Loading branch information
haiqi96 committed Jun 21, 2024
1 parent 4b1e541 commit f57c2c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions components/core/src/clp/clo/clo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,12 @@ bool extract_ir(CommandLineArguments const& command_line_args) {
try {
// Create output directory in case it doesn't exist
std::filesystem::path const output_dir{command_line_args.get_ir_output_dir()};
if (auto const error_code = create_directory(output_dir.parent_path().string(), 0700, true);
if (auto const error_code = create_directory(output_dir.string(), 0700, true);
ErrorCode_Success != error_code)
{
SPDLOG_ERROR(
"Failed to create {} - {}",
output_dir.parent_path().string(),
output_dir.string(),
strerror(errno)
);
return false;
Expand Down
4 changes: 2 additions & 2 deletions components/core/src/clp/clp/decompression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ bool decompress(

// Create output directory in case it doesn't exist
auto output_dir = std::filesystem::path(command_line_args.get_output_dir());
error_code = create_directory(output_dir.parent_path().string(), 0700, true);
error_code = create_directory(output_dir.string(), 0700, true);
if (ErrorCode_Success != error_code) {
SPDLOG_ERROR("Failed to create {} - {}", output_dir.parent_path().c_str(), strerror(errno));
SPDLOG_ERROR("Failed to create {} - {}", output_dir.c_str(), strerror(errno));
return false;
}

Expand Down

0 comments on commit f57c2c9

Please sign in to comment.