diff --git a/src/fileutils.cpp b/src/fileutils.cpp index 95199e3e838b02a0e32a14f6b80f664732543764..5bd085930188c530018bd5a4ee073d0dcedf5454 100644 --- a/src/fileutils.cpp +++ b/src/fileutils.cpp @@ -64,11 +64,13 @@ namespace fileutils { bool check_dir(const std::filesystem::path& path, mode_t dirmode, mode_t parentmode) { + fmt::print("check_dir: {}\n", path.string()); if (std::filesystem::exists(path)) return true; if (path.has_parent_path()) check_dir(path.parent_path(), parentmode, parentmode); - if (std::filesystem::create_directory(path)) { + std::error_code ec; + if (std::filesystem::create_directory(path, ec)) { std::filesystem::permissions(path, (std::filesystem::perms)dirmode); return true; }