summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-09-01 15:20:10 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2021-09-01 18:52:43 +0200
commit71a8f5db9dd79ce1e023c22286a57856c4b7b3fc (patch)
tree95555505355fd7d40e29d43438216546d735e8f8 /unotools
parentf73fd9918b0002128e209b0e5ba7593a05d05c88 (diff)
Simplify dtor logic
Change-Id: I45395f2370474487dc11a0f634c581b30bdc9a61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121427 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/ucbhelper/tempfile.cxx8
1 files changed, 4 insertions, 4 deletions
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);