diff options
| author | Martin Ridgers <[email protected]> | 2021-09-21 11:06:13 +0200 |
|---|---|---|
| committer | Martin Ridgers <[email protected]> | 2021-09-21 11:06:13 +0200 |
| commit | 68c951e0f440ffd483795dced737e88152c1a581 (patch) | |
| tree | 5c0910ca2a85b45fb05dba3ce457b7d156213894 /zencore/filesystem.cpp | |
| parent | Merge main into linux-mac (diff) | |
| parent | Trigger storage scrubbing pass at startup (diff) | |
| download | zen-68c951e0f440ffd483795dced737e88152c1a581.tar.xz zen-68c951e0f440ffd483795dced737e88152c1a581.zip | |
Merged main into linux-mac
Diffstat (limited to 'zencore/filesystem.cpp')
| -rw-r--r-- | zencore/filesystem.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/zencore/filesystem.cpp b/zencore/filesystem.cpp index afbddcdbd..8ddcbac52 100644 --- a/zencore/filesystem.cpp +++ b/zencore/filesystem.cpp @@ -458,14 +458,14 @@ WriteFile(std::filesystem::path Path, const IoBuffer* const* Data, size_t Buffer HRESULT hRes = Outfile.Create(Path.c_str(), GENERIC_WRITE, FILE_SHARE_READ, CREATE_ALWAYS); if (hRes == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND)) { - zen::CreateDirectories(Path.parent_path()); + CreateDirectories(Path.parent_path()); hRes = Outfile.Create(Path.c_str(), GENERIC_WRITE, FILE_SHARE_READ, CREATE_ALWAYS); } if (FAILED(hRes)) { - zen::ThrowSystemException(hRes, "File open failed for '{}'"_format(Path).c_str()); + ThrowSystemException(hRes, "File open failed for '{}'"_format(Path).c_str()); } #else @@ -491,13 +491,13 @@ WriteFile(std::filesystem::path Path, const IoBuffer* const* Data, size_t Buffer while (WriteSize) { - const uint64_t ChunkSize = zen::Min<uint64_t>(WriteSize, uint64_t(2) * 1024 * 1024 * 1024); + const uint64_t ChunkSize = Min<uint64_t>(WriteSize, uint64_t(2) * 1024 * 1024 * 1024); #if ZEN_PLATFORM_WINDOWS hRes = Outfile.Write(DataPtr, gsl::narrow_cast<uint32_t>(WriteSize)); if (FAILED(hRes)) { - zen::ThrowSystemException(hRes, "File write failed for '{}'"_format(Path).c_str()); + ThrowSystemException(hRes, "File write failed for '{}'"_format(Path).c_str()); } #else if (write(Fd, DataPtr, WriteSize) != WriteSize) @@ -630,7 +630,7 @@ FileSystemTraversal::TraverseFileSystem(const std::filesystem::path& RootDir, Tr if (FAILED(hRes)) { - zen::ThrowSystemException(hRes, "Failed to open handle to volume root"); + ThrowSystemException(hRes, "Failed to open handle to volume root"); } while (Continue) |