summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-02-18 18:54:43 +0200
committerJan Holesovsky <kendy@collabora.com>2021-01-07 16:32:51 +0100
commit38b8ff986f38428b7f8ac83a1e1cf65c552b3745 (patch)
tree738fbdf5ed922af5da575474bf676b1ca07b46c2 /unotools
parent6eb05d036d29f07f489f5cd31691f9510f8998a6 (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 dfad33dbe5e4..0beaa741760f 100644
--- a/unotools/source/ucbhelper/tempfile.cxx
+++ b/unotools/source/ucbhelper/tempfile.cxx
@@ -418,7 +418,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));
}