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

Re: set save_empty=no with maildir



On Mon, Nov 24, 2003 at 07:37:04AM -0500, David T-G wrote:
> Chris --
> 
> ...and then Chris Green said...
> % 
> % Should "set save_empty=no" do anything with maildir mailboxes?  It
> % doesn't seem to remove empty maildir mailboxes on my system.
> 
> Dunno there.  Good question.
> 
> 
> % 
> % It's not a huge issue but it's a nuisance having to go and manually
> % delete old mailboxes when you've moved a mailbox somewhere else in the
> % mail hierarchy.  (It's especially a nuisance as maildir mailboxes need
> % two rmdir commands to delete them)
> 
> Eh?  Why on earth is that?
> 
>   rm -r /old/Mail/dir
>   rmdir /old/Mail/dir{/*,}
> 
> Either one -- alone, mind you -- works for me.  Even if you don't expand
> braces for the latter, the former is pretty darned portable!
> 
"rm -r" is a bit risky because it will delete the dir and everything
below it even if directories aren't empty, I like the extra insurance
of rmdir which won't remove non-empty directories.

"rmdir" needs two goes:-
    rmdir dir/*         to remove the cur, tmp and new directories
    rmdir dir           to remove dir itself

-- 
Chris Green (chris@xxxxxxxxxxx)