summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-05-20 18:07:54 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-05-20 18:12:33 +0200
commitf65de4feee506b80be0986ce28f7a2311e4fbe2c (patch)
treedc9bcdb650550e2e2e88c36c2024f895c17b9f6c /unotools
parent1122d513efbb3066b4e8aefbc8dc29ce7a7e9bcf (diff)
fdo#60338: Introduce osl_createDirectoryWithFlags
...so that utl::TempFile can pass osl_File_OpenFlag_Private and doesn't have to resort to umask (the calls to umask around Directory::create had somewhat erroneously been removed recently with 1d72a0262c4570631d0aa8f98e34e21fb9d6ae42 "Related fdo#60338: Create missing temp file dir with user's original umask," mistaking this for creation of intermediate directories in the hierarchy). On Windows, the flags argument to osl_createDirectoryWithFlags is ignored completely for now. Change-Id: Iac56a5049d579be729a3f338aa62105123edb6cb
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/ucbhelper/tempfile.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx
index 5b9cae784b66..9b8d3b518cac 100644
--- a/unotools/source/ucbhelper/tempfile.cxx
+++ b/unotools/source/ucbhelper/tempfile.cxx
@@ -242,7 +242,10 @@ OUString lcl_createName(
aTmp += ".tmp";
if ( bDirectory )
{
- FileBase::RC err = Directory::create( aTmp );
+ FileBase::RC err = Directory::create(
+ aTmp,
+ (osl_File_OpenFlag_Read | osl_File_OpenFlag_Write
+ | osl_File_OpenFlag_Private));
if ( err == FileBase::E_None )
{
// !bKeep: only for creating a name, not a file or directory