From 034d4c111976f337877e5954c6cc95ed9f90a343 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 13 May 2014 14:29:56 +0200 Subject: Related fdo#60338: Setting umask for osl::Directory::open is useless Maybe 39c58e416252571a04b8ebbb56c9fa012b117993 "INTEGRATION: CWS olefix: #i46469# use correct umask on unix" had intended to put it around the osl::Directory::create call instead, but given the trouble of calling umask(3) in a MT program at all, it is probably better to keep creating any missing directories with the user's original umask anyway. Change-Id: Idfddfdab05373a3c395daba635fddcc054f3f215 --- unotools/source/ucbhelper/tempfile.cxx | 7 ------- 1 file changed, 7 deletions(-) diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx index 67dbd4bc2a7e..4e2cb84d09d4 100644 --- a/unotools/source/ucbhelper/tempfile.cxx +++ b/unotools/source/ucbhelper/tempfile.cxx @@ -90,14 +90,7 @@ bool ensuredir( const OUString& rUnqPath ) // HACK: create directory on a mount point with nobrowse option // returns ENOSYS in any case !! osl::Directory aDirectory( aPath ); -#ifdef UNX - /* RW permission for the user only! */ - mode_t old_mode = umask(077); -#endif osl::FileBase::RC nError = aDirectory.open(); -#ifdef UNX - umask(old_mode); -#endif aDirectory.close(); if( nError == osl::File::E_None ) return true; -- cgit v1.2.3