By default, honor umask of the user when saving attachments,
but offer a config entry (without user interface) for those
who explicitely don't like that
([General] section, disregardUmask boolean)

svn path=/branches/KDE/3.5/kdepim/; revision=639336
wilder-work
Martin Koller 19 years ago
parent 06bddd9aa4
commit ad1d5c27ca
  1. 4
      kmail.kcfg
  2. 6
      kmcommands.cpp

@ -87,6 +87,10 @@
</group>
<group name="General">
<entry name="disregardUmask" type="Bool">
<label>Disregard the users umask setting and use "read-write for the user only" instead</label>
<default>false</default>
</entry>
<entry name="SystemTrayEnabled" type="Bool">
<label>Enable system tray icon</label>
<default>false</default>

@ -2627,7 +2627,11 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node,
i18n( "KMail Error" ) );
return Failed;
}
fchmod( file.handle(), S_IRUSR | S_IWUSR );
// #79685 by default use the umask the user defined, but let it be configurable
if ( GlobalSettings::self()->disregardUmask() )
fchmod( file.handle(), S_IRUSR | S_IWUSR );
ds.setDevice( &file );
} else
{

Loading…
Cancel
Save