FAQ about patches | More patches | Main Page | SHA256 digest for this patch

Open an attachment before it is removed
Patch is available for version: alpine 2.01 alpine 2.10 alpine 2.11
When you open an attachment, Alpine goes through a list of viewers either in your .mailcap file, or some other mailcap file in your system. The normal behavior is that Alpine opens a local copy of the attachment, which is removed from the system after the viewer has completed displaying it. For example, if you open an attachment on a viewer and later close the viewer, then control will return to the system and the copy of the attachment will be removed from the system. This is the normal behavior and has been accepted for years as the correct behavior.
However, if an instance of the viewer is already open, the viewer may return control to the system before it reads the copy of the attachment. Given that Alpine removes the copy of the attachment after control is returned to the system, this may cause Alpine to remove the copy of the attachment before it is actually opened by the viewer.
Since Alpine has no control over when a viewer returns from opening a file, and viewers should not return before they read the file, Alpine has no control over when the viewer will read the file and avoid the problem described above.
The value of the option sleep-interval-length is the number of seconds that Alpine will wait between the time that the viewer returns control to the system and the when it will remove it from the system. You will not notice this delay, since this will happen in the background. The default value is 0 which means that no delay will occur, and it is a value which may trigger the problem described above with some viewers. By modifying the value of this option you can set Alpine to wait longer. A reasonable small value is 5, which works with all viewers tested to date. The maximum value is 120 (2 minutes).

Last Updated 14:50:22 MDT Sun Aug 11 2013.