diff options
author | David Robillard <d@drobilla.net> | 2024-10-12 13:38:39 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2024-10-12 13:38:39 -0400 |
commit | e9c0cb8ad25104d62fdc45efc21de68292b3f94c (patch) | |
tree | 6f43d2dd53b579f648cd1768f64bbac93b91d30c /src | |
parent | 91bb3a33c5bc571e7dcc122e9eacf8d5687b9564 (diff) | |
download | ingen-e9c0cb8ad25104d62fdc45efc21de68292b3f94c.tar.gz ingen-e9c0cb8ad25104d62fdc45efc21de68292b3f94c.tar.bz2 ingen-e9c0cb8ad25104d62fdc45efc21de68292b3f94c.zip |
Fix configuration directory creation error handling
Diffstat (limited to 'src')
-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))); } |