diff options
| author | Dan Engelbrecht <[email protected]> | 2022-08-26 13:37:19 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-08-26 04:37:19 -0700 |
| commit | 57ba63d2f63847934b8d197a77c1eca292ed6e41 (patch) | |
| tree | bce9d3038b3eadc83f6b330dee3300509ec550cf /zencore/filesystem.cpp | |
| parent | redefine vcpkg cache naming (diff) | |
| download | zen-57ba63d2f63847934b8d197a77c1eca292ed6e41.tar.xz zen-57ba63d2f63847934b8d197a77c1eca292ed6e41.zip | |
Use "\\?\" prefixed paths and fix hardcoded path delimiters (#149)
* use "\\?\" prefix for windows paths
* fix path delimiters
* disable vcpkg caching
* Workaround for spdlog not being able to create directories prefixed with `\\?\`
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 |