<<< Date Index >>>     <<< Thread Index >>>

[Mutt] #3422: Do not remove temporary files when viewing attachments



#3422: Do not remove temporary files when viewing attachments
---------------------------------------------------+------------------------
 Reporter:  madduck                                |       Owner:  mutt-dev
     Type:  enhancement                            |      Status:  new     
 Priority:  major                                  |   Milestone:          
Component:  mutt                                   |     Version:  1.5.20  
 Keywords:  temporary files attachments data loss  |  
---------------------------------------------------+------------------------
 When you press enter on an attachment, mutt saves it to a temporary
 file and spawns the viewer, passing it the filename as $1. When the
 viewer exits, mutt removes the file.

 I can think of three reasons not to do this:

 - Some viewers, like ooffice or iceweasel, return control to their
   caller before the application has actually started. In such cases,
   it can happen that the file is gone by the time the viewer tries
   to open it.

 - I might inadverently edit an image or document I received as an
   attachment and risk losing my changes if I don't save to a new
   name.

 To guard against the first, mutt could delay deleting by a few
 seconds.

 To guard against the second, mutt could check a timestamp, size, or
 hashsum, or combination thereof, and only delete if those have not
 changed.

 However, I think mutt should just not delete the temporary file, if
 it's an attachment. /tmp is set to autoclean itself on reboot
 anyway, and tmpreaper is used wherever this doesn't suffice. Plus,
 disk space is getting bigger (and so is /tmp), so I don't see the
 need to clean up

-- 
Ticket URL: <http://dev.mutt.org/trac/ticket/3422>
Mutt <http://www.mutt.org/>
The Mutt mail user agent