summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/source/stream/strmwnt.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/source/stream/strmwnt.cxx b/tools/source/stream/strmwnt.cxx
index 23fa71526447..d85ce3a0c372 100644
--- a/tools/source/stream/strmwnt.cxx
+++ b/tools/source/stream/strmwnt.cxx
@@ -300,13 +300,18 @@ void SvFileStream::Open( const OUString& rFilename, StreamMode nMode )
nOpenAction = OPEN_EXISTING;
}
+ DWORD nAttributes = FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS;
+
+ if ( nMode & StreamMode::TEMPORARY )
+ nAttributes |= FILE_ATTRIBUTE_TEMPORARY;
+
pInstanceData->hFile = CreateFileW(
o3tl::toW(aFilename.getStr()),
nAccessMode,
nShareMode,
nullptr,
nOpenAction,
- FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS,
+ nAttributes,
nullptr
);