[imp] Attachments not being cleaned up on cancellations

Michael M Slusarz slusarz@bigworm.colorado.edu
Thu, 15 Aug 2002 17:03:17 -0600


Quoting Rick Irvine <irvine@purdue.edu>:

| 
| 
| IMP 3.1
| Horde 2.1
| RedHat 7.3 machines
| 
| Hello all,
| 
| Has anyone else noticed a behavior in their IMP installations whereby
| compose
| windows with attached messages do not delete (call unlink) the mime
| attachment
| if the cancel button is clicked?
| 
| I'm still learning PHP and don't know javascript, but it appears as if
| the
| code for the send button correctly handles cleaning up the mime
| attachment(s);
| whereas the cancel button just calls a javascript function to confirm the
| cancellation and doesn't clean up the attachment file.
| 
| I checked bot RELENG and HEAD in CVS and they both appear to do this.  (I
| checked HEAD only by visual inspection of the code, they both appear to
| be
| the same in that area.)

HEAD correctly deletes all attachments when you press cancel.  Not so in 
the 3.x branch - although I should probably backport the new code to it.  
In the meantime, your only option is probably to run a cron job (e.g. 
tmpwatch on Linux) to delete unneeded files in the temporary attachment 
directory.

michael

______________________________________________
Michael Slusarz [slusarz@bigworm.colorado.edu]
The University of Colorado at Boulder