aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/filecas.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2023-05-15 17:58:46 +0200
committerGitHub <[email protected]>2023-05-15 17:58:46 +0200
commit121d3fb3d9835ec78a1de7f268e79bf79cbf5865 (patch)
tree2f9c9f5c6a1d3ed41a9f3009104002bc5dd94bb8 /src/zenstore/filecas.cpp
parentall threads should be named (#304) (diff)
downloadzen-121d3fb3d9835ec78a1de7f268e79bf79cbf5865.tar.xz
zen-121d3fb3d9835ec78a1de7f268e79bf79cbf5865.zip
Remove ATL header usage (#306)
ATL has been used here and there as a convenience. Given that this is a legacy component and not always something which gets installed along with the compiler we hereby remove the dependency altogether in favour of our own simple wrappers
Diffstat (limited to 'src/zenstore/filecas.cpp')
-rw-r--r--src/zenstore/filecas.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/zenstore/filecas.cpp b/src/zenstore/filecas.cpp
index 108d37607..4474b52bd 100644
--- a/src/zenstore/filecas.cpp
+++ b/src/zenstore/filecas.cpp
@@ -33,7 +33,7 @@
ZEN_THIRD_PARTY_INCLUDES_START
#include <xxhash.h>
#if ZEN_PLATFORM_WINDOWS
-# include <atlfile.h>
+# include <zencore/windows.h>
#endif
ZEN_THIRD_PARTY_INCLUDES_END
@@ -301,7 +301,7 @@ FileCasStrategy::InsertChunk(IoBuffer Chunk, const IoHash& ChunkHash, CasStore::
const HANDLE ChunkFileHandle = FileRef.FileHandle;
// See if file already exists
{
- CAtlFile PayloadFile;
+ windows::FileHandle PayloadFile;
if (HRESULT hRes = PayloadFile.Create(Name.ShardedPath.c_str(), GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING); SUCCEEDED(hRes))
{
@@ -386,7 +386,7 @@ FileCasStrategy::InsertChunk(IoBuffer Chunk, const IoHash& ChunkHash, CasStore::
// The rename/move could fail because the target directory does not yet exist. This code attempts
// to create it
- CAtlFile DirHandle;
+ windows::FileHandle DirHandle;
auto InternalCreateDirectoryHandle = [&] {
return DirHandle.Create(FilePath.c_str(),
@@ -551,7 +551,7 @@ FileCasStrategy::InsertChunk(const void* const ChunkData, const size_t ChunkSize
// See if file already exists
#if ZEN_PLATFORM_WINDOWS
- CAtlFile PayloadFile;
+ windows::FileHandle PayloadFile;
HRESULT hRes = PayloadFile.Create(Name.ShardedPath.c_str(), GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING);