On Thu, Dec 22, 2011 at 6:15 PM, Richard Hipp <[email protected]> wrote:

> The rmdir(2) system call on Posix is a no-op if the directory is not
> empty.  So I was thinking that we could just invoke rmdir() (or _rmdir() on
> windows) on the directory of a file every time a file is deleted, and let
> the OS worry about whether or not the directory is empty.
>
> But then I read this on the Linux rmdir(2) manpage:
>
> "Infelicities in the protocol underlying NFS can cause the unexpected
> disappearance of directories which are still being used."
>
> Is that something to worry about?  Anybody know?
>

I use "rmdir -p --ignore-fail-on-non-empty /path/to/dir" to remove all non
empty dirs on a specific path extensively in scripts and I've never seen
wrong behavior on NFS. It will remove all the empty dirs starting at the
leaf and then stop without error on the dir that contains other dirs or
files. I'm not sure how those switches translate to the C library calls or
even it they do at all.


> --
> D. Richard Hipp
> [email protected]
>
> _______________________________________________
> fossil-users mailing list
> [email protected]
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>
>
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to