From 55918b5c1f0840b4d94e04f6552dc2c48d55a317 Mon Sep 17 00:00:00 2001 From: Gopesh Bhardwaj Date: Tue, 9 Jan 2024 23:49:00 +0530 Subject: [PATCH] Fixes bug when nested directories are created; eg: out/pmc_1 (#345) * Fixes bug when nested directories are created; eg: out/pmc_1 * source formatting (clang-format v11) (#346) Co-authored-by: bgopesh --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: bgopesh --- source/lib/rocprofiler-sdk-tool/tool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/lib/rocprofiler-sdk-tool/tool.cpp b/source/lib/rocprofiler-sdk-tool/tool.cpp index 9d6fb2ec76..7f11dc5476 100644 --- a/source/lib/rocprofiler-sdk-tool/tool.cpp +++ b/source/lib/rocprofiler-sdk-tool/tool.cpp @@ -62,7 +62,7 @@ get_output_stream(const std::string& fname, const std::string& ext = ".csv") throw std::runtime_error{ fmt::format("ROCPROFILER_OUTPUT_PATH ({}) already exists and is not a directory", output_path.string())}; - if(!fs::exists(output_path)) fs::create_directory(output_path); + if(!fs::exists(output_path)) fs::create_directories(output_path); auto output_file = output_path / (output_file_name + fname + ext); auto* _ofs = new std::ofstream{output_file};