diff options
author | B Stack <bgstack15@gmail.com> | 2020-10-03 01:04:14 +0000 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2020-10-03 01:04:14 +0000 |
commit | 0576c1a2ab5ff534348c879ea03bb9c9d9f7ac4c (patch) | |
tree | d8a89392817379e3036c42eedebf33d4fb372dfd /zen/file_io.cpp | |
parent | Merge branch '11.1' into 'master' (diff) | |
parent | add upstream 11.2 (diff) | |
download | FreeFileSync-0576c1a2ab5ff534348c879ea03bb9c9d9f7ac4c.tar.gz FreeFileSync-0576c1a2ab5ff534348c879ea03bb9c9d9f7ac4c.tar.bz2 FreeFileSync-0576c1a2ab5ff534348c879ea03bb9c9d9f7ac4c.zip |
Merge branch '11.2' into 'master'11.2
add upstream 11.2
See merge request opensource-tracking/FreeFileSync!26
Diffstat (limited to 'zen/file_io.cpp')
-rw-r--r-- | zen/file_io.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/zen/file_io.cpp b/zen/file_io.cpp index 4c6602cc..33c41fbc 100644 --- a/zen/file_io.cpp +++ b/zen/file_io.cpp @@ -15,7 +15,7 @@ using namespace zen; FileBase::~FileBase() { - if (hFile_ != invalidFileHandle_) + if (hFile_ != invalidFileHandle) try { close(); //throw FileError @@ -26,9 +26,9 @@ FileBase::~FileBase() void FileBase::close() //throw FileError { - if (hFile_ == invalidFileHandle_) + if (hFile_ == invalidFileHandle) throw FileError(replaceCpy(_("Cannot write file %x."), L"%x", fmtPath(getFilePath())), L"Contract error: close() called more than once."); - ZEN_ON_SCOPE_EXIT(hFile_ = invalidFileHandle_); + ZEN_ON_SCOPE_EXIT(hFile_ = invalidFileHandle); if (::close(hFile_) != 0) THROW_LAST_FILE_ERROR(replaceCpy(_("Cannot write file %x."), L"%x", fmtPath(getFilePath())), "close"); @@ -198,7 +198,7 @@ FileOutput::FileOutput(const Zstring& filePath, const IOCallback& notifyUnbuffer FileOutput::~FileOutput() { - if (getHandle() != invalidFileHandle_) //not finalized => clean up garbage + if (getHandle() != invalidFileHandle) //not finalized => clean up garbage { //"deleting while handle is open" == FILE_FLAG_DELETE_ON_CLOSE if (::unlink(getFilePath().c_str()) != 0) |