diff options
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); |