diff options
| author | Dan Engelbrecht <[email protected]> | 2026-04-08 13:52:23 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2026-04-08 13:52:23 +0200 |
| commit | 8318ec626584a6b39a73d7275b0015fadd983ba6 (patch) | |
| tree | 5d20e90419a838069fbe356aba3c8eb3c0255524 /src | |
| parent | fix missing chunk in oplog export (#925) (diff) | |
| download | zen-8318ec626584a6b39a73d7275b0015fadd983ba6.tar.xz zen-8318ec626584a6b39a73d7275b0015fadd983ba6.zip | |
don't hard fail if .pending folder is not empty on oplog export (#926)
Diffstat (limited to 'src')
| -rw-r--r-- | src/zencore/iobuffer.cpp | 7 | ||||
| -rw-r--r-- | src/zenremotestore/projectstore/remoteprojectstore.cpp | 5 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/zencore/iobuffer.cpp b/src/zencore/iobuffer.cpp index c47c54981..117011a32 100644 --- a/src/zencore/iobuffer.cpp +++ b/src/zencore/iobuffer.cpp @@ -210,7 +210,12 @@ IoBufferExtendedCore::~IoBufferExtendedCore() // Mark file for deletion when final handle is closed FILE_DISPOSITION_INFO Fdi{.DeleteFile = TRUE}; - SetFileInformationByHandle(m_FileHandle, FileDispositionInfo, &Fdi, sizeof Fdi); + if (!SetFileInformationByHandle(m_FileHandle, FileDispositionInfo, &Fdi, sizeof Fdi)) + { + ZEN_WARN("SetFileInformationByHandle(DeleteOnClose) failed for file handle {}, reason '{}'", + m_FileHandle, + GetLastErrorAsString()); + } #else std::error_code Ec; std::filesystem::path FilePath = zen::PathFromHandle(m_FileHandle, Ec); diff --git a/src/zenremotestore/projectstore/remoteprojectstore.cpp b/src/zenremotestore/projectstore/remoteprojectstore.cpp index 07588e58e..e4d0d7cd2 100644 --- a/src/zenremotestore/projectstore/remoteprojectstore.cpp +++ b/src/zenremotestore/projectstore/remoteprojectstore.cpp @@ -392,7 +392,10 @@ namespace remotestore_impl { OodleCompressor Compressor, OodleCompressionLevel CompressionLevel) { - ZEN_ASSERT(!IsFile(AttachmentPath)); + if (IsFile(AttachmentPath)) + { + ZEN_WARN("Temp attachment file already exists at '{}', truncating", AttachmentPath); + } BasicFile CompressedFile; std::error_code Ec; CompressedFile.Open(AttachmentPath, BasicFile::Mode::kTruncateDelete, Ec); |