From 4cec2ba76320e404452599c693982d32f29a9269 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Thu, 15 Aug 2024 11:55:30 +0200 Subject: 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 --- src/zenutil/basicfile.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/zenutil/basicfile.cpp') 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 -- cgit v1.2.3