diff options
-rw-r--r-- | src/Configuration.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Configuration.cpp b/src/Configuration.cpp index e6461afc..b8a717ba 100644 --- a/src/Configuration.cpp +++ b/src/Configuration.cpp @@ -284,8 +284,10 @@ Configuration::save(URIMap& uri_map, } // Create parent directories if necessary - const FilePath dir = path.parent_path(); - if (!std::filesystem::create_directories(dir)) { + const FilePath dir = path.parent_path(); + std::error_code ec; + std::filesystem::create_directories(dir, ec); + if (ec) { throw FileError(fmt("Error creating directory %1% (%2%)", dir, strerror(errno))); } |