summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-02-18 18:54:43 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-02-19 09:14:31 +0100
commit27960861a66d13a3f0bb3ff8503bc9fdb53745da (patch)
tree3c8a44a66de75c2756dcea7a36835d4bbd0bd43e /unotools
parentfcc30680ee7ac7d2bf9ec4ccdae7256b61ad7102 (diff)
use FILE_ATTRIBUTE_TEMPORARY on Windows for temp files
which acts as a hint to the OS that these files do not need persistent storage. If there is sufficient system RAM, these files will never even hit disk. Change-Id: I25b83aad67fda58ec39cead8bd1eb038892d3cde Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88124 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/ucbhelper/tempfile.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx
index afda12972ac0..f6d66bdc33b6 100644
--- a/unotools/source/ucbhelper/tempfile.cxx
+++ b/unotools/source/ucbhelper/tempfile.cxx
@@ -420,7 +420,7 @@ SvStream* TempFile::GetStream( StreamMode eMode )
if (!pStream)
{
if (!aName.isEmpty())
- pStream.reset(new SvFileStream(aName, eMode));
+ pStream.reset(new SvFileStream(aName, eMode | StreamMode::TEMPORARY));
else
pStream.reset(new SvMemoryStream(nullptr, 0, eMode));
}