#2707: On NFS creating files by mutt leaves empty .muttXXX tmp-dirs behind Changes (by brendan):
* priority: major => minor * milestone: => 1.6 Old description: > {{{ > Any file created is opened via "safe_open" in a .muttXXX subdir 1st > and then it wants to move/ rename to its real/ final destination. > > Problem: when moving/ renaming while it is already being accessed, > on NFS this causes the creation of .muttXXX/.nfsXXX > being a hardlink to the just moved file. > When mutt ends, the .nfsXXX file is removed, but the ~/.muttXXX empty dir > remains behind, cluttering up the dir where it was created with each > invocation. > >How-To-Repeat: > Define HOME (and use "mutt -d") or "tmpdir" to be on NFS, > then invoke mutt several times and start editing. > Affects all calls to "safe_open" on NFS. > >Fix: > Don't use "safe_open" in "safe_fopen", replace with "open". > }}} New description: Any file created is opened via "safe_open" in a .muttXXX subdir 1st and then it wants to move/ rename to its real/ final destination. Problem: when moving/ renaming while it is already being accessed, on NFS this causes the creation of .muttXXX/.nfsXXX being a hardlink to the just moved file. When mutt ends, the .nfsXXX file is removed, but the ~/.muttXXX empty dir remains behind, cluttering up the dir where it was created with each invocation. >How-To-Repeat: Define HOME (and use "mutt -d") or "tmpdir" to be on NFS, then invoke mutt several times and start editing. Affects all calls to "safe_open" on NFS. >Fix: Don't use "safe_open" in "safe_fopen", replace with "open". Comment: Might be better to find a way to force the tombstone hardlink to be removed before removing the directory. -- Ticket URL: <http://dev.mutt.org/trac/ticket/2707#comment:2>