Fixed stupid umask call from #38bf13ef

master
Vladimir Stackov 2015-07-30 15:14:52 +03:00
parent 9f93ecac27
commit 6b0fd79da0
1 changed files with 2 additions and 1 deletions

View File

@ -44,8 +44,9 @@ sptr< TemporaryFile > TmpMgr::makeTemporaryFile()
{
string name( Dir::addPath( path, "XXXXXX") );
umask( S_IRUSR | S_IWUSR | S_IRGRP );
int fd = mkstemp( &name[ 0 ] );
if ( fchmod ( fd, S_IRUSR | S_IWUSR | S_IRGRP ) != 0 )
throw exCantCreate( path );
if ( fd == -1 || close( fd ) != 0 )
throw exCantCreate( path );