diff options
Diffstat (limited to 'unotools/source/ucbhelper/tempfile.cxx')
-rw-r--r-- | unotools/source/ucbhelper/tempfile.cxx | 8 |
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); |