aboutsummaryrefslogtreecommitdiff
path: root/src/zenutil/basicfile.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2024-08-15 11:55:30 +0200
committerGitHub Enterprise <[email protected]>2024-08-15 11:55:30 +0200
commit4cec2ba76320e404452599c693982d32f29a9269 (patch)
tree9108b046dd7b180210d82f443bbdb56dba583e68 /src/zenutil/basicfile.cpp
parent5.5.4-pre1 (diff)
downloadzen-4cec2ba76320e404452599c693982d32f29a9269.tar.xz
zen-4cec2ba76320e404452599c693982d32f29a9269.zip
adds more information in log when oplog rename/delete fails (#117)
* adds more information in log when oplog rename/delete fails * warn if we fail to delete dropped directory * close oplog storage file inside try/catch * don't try to flush closed files
Diffstat (limited to 'src/zenutil/basicfile.cpp')
-rw-r--r--src/zenutil/basicfile.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/zenutil/basicfile.cpp b/src/zenutil/basicfile.cpp
index d837c2caf..266146ca1 100644
--- a/src/zenutil/basicfile.cpp
+++ b/src/zenutil/basicfile.cpp
@@ -359,6 +359,10 @@ BasicFile::WriteAll(IoBuffer Data, std::error_code& Ec)
void
BasicFile::Flush()
{
+ if (m_FileHandle == nullptr)
+ {
+ return;
+ }
#if ZEN_PLATFORM_WINDOWS
FlushFileBuffers(m_FileHandle);
#else