aboutsummaryrefslogtreecommitdiff
path: root/zencore/filesystem.cpp
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2021-09-21 11:06:13 +0200
committerMartin Ridgers <[email protected]>2021-09-21 11:06:13 +0200
commit68c951e0f440ffd483795dced737e88152c1a581 (patch)
tree5c0910ca2a85b45fb05dba3ce457b7d156213894 /zencore/filesystem.cpp
parentMerge main into linux-mac (diff)
parentTrigger storage scrubbing pass at startup (diff)
downloadzen-68c951e0f440ffd483795dced737e88152c1a581.tar.xz
zen-68c951e0f440ffd483795dced737e88152c1a581.zip
Merged main into linux-mac
Diffstat (limited to 'zencore/filesystem.cpp')
-rw-r--r--zencore/filesystem.cpp10
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)