aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/buildstore/buildstore.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2025-03-31 10:24:39 +0200
committerGitHub Enterprise <[email protected]>2025-03-31 10:24:39 +0200
commitfd2efb5af872a357dbc0f729f4101a330dcb4fda (patch)
tree949e933156467113b861f4b0ca5862f9cdf10189 /src/zenstore/buildstore/buildstore.cpp
parentcheck file from local track state during download (#329) (diff)
downloadzen-fd2efb5af872a357dbc0f729f4101a330dcb4fda.tar.xz
zen-fd2efb5af872a357dbc0f729f4101a330dcb4fda.zip
long filename support (#330)
- Bugfix: Long file paths now works correctly on Windows
Diffstat (limited to 'src/zenstore/buildstore/buildstore.cpp')
-rw-r--r--src/zenstore/buildstore/buildstore.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/zenstore/buildstore/buildstore.cpp b/src/zenstore/buildstore/buildstore.cpp
index eb36be049..f26901458 100644
--- a/src/zenstore/buildstore/buildstore.cpp
+++ b/src/zenstore/buildstore/buildstore.cpp
@@ -71,7 +71,7 @@ BuildStore::BuildStore(const BuildStoreConfig& Config, GcManager& Gc)
{
std::filesystem::path BlobLogPath = blobstore::impl::GetBlobLogPath(Config.RootDirectory);
std::filesystem::path MetaLogPath = blobstore::impl::GetMetaLogPath(Config.RootDirectory);
- bool IsNew = !(std::filesystem::exists(BlobLogPath) && std::filesystem::exists(MetaLogPath));
+ bool IsNew = !(IsFile(BlobLogPath) && IsFile(MetaLogPath));
if (!IsNew)
{
@@ -501,7 +501,7 @@ uint64_t
BuildStore::ReadPayloadLog(const RwLock::ExclusiveLockScope&, const std::filesystem::path& LogPath, uint64_t SkipEntryCount)
{
ZEN_TRACE_CPU("BuildStore::ReadPayloadLog");
- if (!std::filesystem::is_regular_file(LogPath))
+ if (!IsFile(LogPath))
{
return 0;
}
@@ -518,7 +518,7 @@ BuildStore::ReadPayloadLog(const RwLock::ExclusiveLockScope&, const std::filesys
TCasLogFile<PayloadDiskEntry> CasLog;
if (!CasLog.IsValid(LogPath))
{
- std::filesystem::remove(LogPath);
+ RemoveFile(LogPath);
return 0;
}
CasLog.Open(LogPath, CasLogFile::Mode::kRead);
@@ -603,7 +603,7 @@ uint64_t
BuildStore::ReadMetadataLog(const RwLock::ExclusiveLockScope&, const std::filesystem::path& LogPath, uint64_t SkipEntryCount)
{
ZEN_TRACE_CPU("BuildStore::ReadMetadataLog");
- if (!std::filesystem::is_regular_file(LogPath))
+ if (!IsFile(LogPath))
{
return 0;
}
@@ -620,7 +620,7 @@ BuildStore::ReadMetadataLog(const RwLock::ExclusiveLockScope&, const std::filesy
TCasLogFile<MetadataDiskEntry> CasLog;
if (!CasLog.IsValid(LogPath))
{
- std::filesystem::remove(LogPath);
+ RemoveFile(LogPath);
return 0;
}
CasLog.Open(LogPath, CasLogFile::Mode::kRead);