Bug 164997 - kmail opens attachments RO and saves attachements RO which is hugely annoying and should be an option
Summary: kmail opens attachments RO and saves attachements RO which is hugely annoying...
Status: RESOLVED WAITINGFORINFO
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2008-06-26 12:17 UTC by davidblunkett
Modified: 2012-08-19 00:20 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description davidblunkett 2008-06-26 12:17:40 UTC
Version:           3.5.7. release 72.4 but all versions since 2004 (using KDE 3.5.9)
Installed from:    SuSE RPMs
OS:                Linux

The permissions set by kmail on temporary files should be user definable - instead they have been hard wired to RO for some time and this is hugely annoying.

Basically when you open an attachement it is saved as a temp file with RO perms - historically this was to prevent newbies from losing files they edited and saved and were then subsequently clean by kmail on exit.

kmail should also check for changes on exit and only clean files that haven't changed - warning about others.

This is distinct from bug 79685
Comment 1 Bram Schoenmakers 2008-06-26 14:00:57 UTC
Can not reproduce, are you sure your umask does not lead to this behavior?
Comment 2 davidblunkett 2008-06-30 00:17:00 UTC
Ok - in kmail when I open an attachement it is always RO.  I believe this is hardwired into kmail (For the last several years I have been hacking out this kludge but currently can't build kdepim because of a missing dependancy in my distro).

See lines circs 1714 in kmreaderwin.cpp:

//-----------------------------------------------------------------------------
QString KMReaderWin::writeMessagePartToTempFile( KMMessagePart* aMsgPart,
                                                 int aPartNum )
{
...
  mTempFiles.append( fname );
  // make file read-only so that nobody gets the impression that he might
  // edit attached files (cf. bug #52813)
  ::chmod( QFile::encodeName( fname ), S_IRUSR );

  return fname;
}



[Incidently when I save an attachment or drag it to the desktop it is always RO despite having followed the suggestions in bug 79685, my umask is 022 and I still get RO.]
Comment 3 Martin Fitzpatrick 2009-04-04 17:03:59 UTC
Can confirm this behaviour on 4.2.2 (Kubuntu) that all attachments are opened read-only. It's more noticeable with OpenOffice docs as that prevents you from even editing the file once opened (without giving any warning) until it is re-saved.

Saying that the request to allow RW and then warn on shutdown sounds like a feature request (wishlist?) and it sounds like a fairly big job. Is the suggestion to pop up a box(es) for each file that has been changed and require a save-to location from the user on shutdown of Kmail?

Its a shame there is no way to tell the opening app to treat the file as 'unsaved' so when attempting to save it behaves as if it is a new document.
Comment 4 Christophe Marin 2009-05-25 16:12:15 UTC

*** This bug has been marked as a duplicate of bug 185837 ***
Comment 5 davidblunkett 2010-08-14 10:38:34 UTC
This is live in kde 4.4.2 - attachment dragged from kmail to the desktop have RO permissions
Comment 6 Christophe Marin 2010-08-14 10:41:58 UTC

*** This bug has been marked as a duplicate of bug 171800 ***
Comment 7 Aldoo 2011-01-04 11:31:37 UTC
Isn't bug 171800 a different issue?
This bug is about opening and saving attachments, and bug 171800 is only about drag and drop to desktop.

Ideally I'd wish both issues to be addressed, which will never happen if bug 164007 is already closed.
Comment 8 davidblunkett 2011-01-04 19:53:32 UTC
I agree and have changed this to reopened.  Given the simplicity of the fix and the huge number amount of time it has been here I wouldn't hold out any hope it will ever be fixed!
Comment 9 davidblunkett 2011-08-03 22:08:54 UTC
Still live in 1.13.6 / kde 4.6
Comment 10 Myriam Schweingruber 2012-08-18 08:12:49 UTC
Thank you for your feature request. Kmail1 is currently unmaintained so we are closing all wishes. Please feel free to reopen a feature request for Kmail2 if it has not already been implemented.
Thank you for your understanding.
Comment 11 Luigi Toscano 2012-08-19 00:20:36 UTC
Instead of creating a new feature request, please confirm here if the wishlist is still valid for kmail2.