unotools/source/ucbhelper/tempfile.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit 71a8f5db9dd79ce1e023c22286a57856c4b7b3fc Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Wed Sep 1 15:20:10 2021 +0200 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Wed Sep 1 18:52:43 2021 +0200 Simplify dtor logic Change-Id: I45395f2370474487dc11a0f634c581b30bdc9a61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121427 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx index bf41c00e2428..b53a56c60c02 100644 --- a/unotools/source/ucbhelper/tempfile.cxx +++ b/unotools/source/ucbhelper/tempfile.cxx @@ -385,12 +385,12 @@ TempFile::TempFile(TempFile && other) noexcept : TempFile::~TempFile() { - // if we're going to delete this file, no point in flushing it when closing - if (pStream && bKillingFileEnabled && !aName.isEmpty()) - static_cast<SvFileStream*>(pStream.get())->SetDontFlushOnClose(true); - pStream.reset(); if ( bKillingFileEnabled ) { + // if we're going to delete this file, no point in flushing it when closing + if (pStream && !aName.isEmpty()) + static_cast<SvFileStream*>(pStream.get())->SetDontFlushOnClose(true); + pStream.reset(); if ( bIsDirectory ) { comphelper::DirectoryHelper::deleteDirRecursively(aName);