From a40bfabfd1a6fd95b9b8d39db37bb08fbefff334 Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 11 Sep 2022 15:30:43 +0200 Subject: Fixed handling return value of create_directories --- ArchiveEx/dat.cpp | 6 +++--- 1 file 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 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()) -- cgit v1.1