Merge remote-tracking branch 'origin/Applications/18.04'

remotes/offline-stg/wilder
Albert Astals Cid 8 years ago
commit b3f8b51b39
  1. 12
      part.cpp

@ -2763,6 +2763,18 @@ bool Part::saveAs( const QUrl & saveUrl, SaveAsFlags flags )
if ( url().isLocalFile() )
setFileToWatch( localFilePath() );
//Set correct permission taking into account the umask value
#ifndef Q_OS_WIN
const QString saveFilePath = saveUrl.toLocalFile();
if ( QFile::exists( saveFilePath ) )
{
const mode_t mask = umask( 0 );
umask( mask );
const mode_t fileMode = 0666 & ~mask;
chmod( saveFilePath.toLocal8Bit().constData(), fileMode );
}
#endif
return true;
}

Loading…
Cancel
Save