diff options
Diffstat (limited to 'zencore/filesystem.cpp')
| -rw-r--r-- | zencore/filesystem.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/zencore/filesystem.cpp b/zencore/filesystem.cpp index 01997daae..5e376ffda 100644 --- a/zencore/filesystem.cpp +++ b/zencore/filesystem.cpp @@ -189,7 +189,12 @@ bool CreateDirectories(const std::filesystem::path& Dir) { std::error_code ErrorCode; - return std::filesystem::create_directories(Dir, ErrorCode); + bool WasCreated = std::filesystem::create_directories(Dir, ErrorCode); + if (ErrorCode) + { + throw std::system_error(ErrorCode, fmt::format("Failed to create directories for '{}'", Dir.string())); + } + return WasCreated; } bool |