diff options
author | Aki <please@ignore.pl> | 2022-09-11 15:30:43 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-09-11 15:30:43 +0200 |
commit | a40bfabfd1a6fd95b9b8d39db37bb08fbefff334 (patch) | |
tree | 06075eae9de743dfa01e0461812244ae0807541c | |
parent | 60291e0f668f8d45aa1e4a83068e0a9067749e60 (diff) | |
download | starshatter-a40bfabfd1a6fd95b9b8d39db37bb08fbefff334.zip starshatter-a40bfabfd1a6fd95b9b8d39db37bb08fbefff334.tar.gz starshatter-a40bfabfd1a6fd95b9b8d39db37bb08fbefff334.tar.bz2 |
Fixed handling return value of create_directories
-rw-r--r-- | ArchiveEx/dat.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ArchiveEx/dat.cpp b/ArchiveEx/dat.cpp index 3c026b2..dc0acc9 100644 --- a/ArchiveEx/dat.cpp +++ b/ArchiveEx/dat.cpp @@ -201,9 +201,9 @@ try { if (0 > length) throw ExtractError(); std::unique_ptr<std::uint8_t[]> buf{tmp}; - std::error_code ec; - const bool created = fs::create_directories(path.parent_path(), ec); - if (!created) + std::error_code err; + fs::create_directories(path.parent_path(), err); + if (err) throw ExtractError(); std::ofstream file{path}; if (!file.is_open()) |