delete selected folder leaves empty dir on disk

John Alton Tamplin jtampli at sph.emory.edu
Fri Jan 10 15:52:27 EST 2003


Rob Siemborski wrote:

>We do currently call rmdir() on the directory.
>
>The applicable code is in mailbox_delete() in mailbox.c if you'd like to
>suggest a patch.
>  
>
Since rmdir() doesn't delete it, I assume that means there is some entry 
in the directory which wasn't deleted.  Since you have apparently looked 
at this before, what is the cause?  Is unlink failing on some file for 
some reason, or is it a race condition of a file being created after the 
opendir() and before the rmdir() loop?

This has been particularly annoying here during the conversion, because 
Mail::IMAPClient uses temporary folders and it deletes them while they 
are selected, leaving thousands of empty top-level directories.  I shut 
the server down and cleaned them up, but that isn't something I would 
like to do often.

-- 
John A. Tamplin                               Unix System Administrator
Emory University, School of Public Health     +1 404/727-9931







More information about the Info-cyrus mailing list