fdo#36733: Add useronly read permission, while creating tmpfile.
Signed-off-by: Michael Meeks <michael.meeks@novell.com>
This commit is contained in:
parent
53d325115e
commit
de8e1d6651
1 changed files with 6 additions and 5 deletions
|
@ -3330,11 +3330,12 @@ sal_Bool SfxMedium::SetWritableForUserOnly( const ::rtl::OUString& aURL )
|
|||
{
|
||||
sal_uInt64 nAttributes = aFileStatus.getAttributes();
|
||||
|
||||
nAttributes &= ~(Attribute_OwnWrite |
|
||||
Attribute_GrpWrite |
|
||||
Attribute_OthWrite |
|
||||
Attribute_ReadOnly);
|
||||
nAttributes |= Attribute_OwnWrite;
|
||||
nAttributes &= ~(osl_File_Attribute_OwnWrite |
|
||||
osl_File_Attribute_GrpWrite |
|
||||
osl_File_Attribute_OthWrite |
|
||||
osl_File_Attribute_ReadOnly);
|
||||
nAttributes |= (osl_File_Attribute_OwnWrite |
|
||||
osl_File_Attribute_OwnRead);
|
||||
|
||||
bResult = ( osl::File::setAttributes( aURL, nAttributes ) == ::osl::FileBase::E_None );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue