Roland McGrath <[EMAIL PROTECTED]> writes: > Note, however, that this optimization in find will quite totally break the > filesystem semantics presented by translators set on regular files. That > is, a translator set on a regular file may well report S_IFDIR and so a > find ought to treat it as a directory. But the underlying node isn't a > directory and so doesn't have a .. node contributing to the containing > directory's link count.
This is a realy problem with find, and we should report it. (Actually, we should try and provide a patch.) It opens a question: do we want the decision to hinge on whether S_IFDIR is returned? The other thing is to test on whether it really is a subdir. (Note that my earlier note about st_nlink is about subdirs, S_IFDIR.) A real subdir, of course, is one that supports directory operations. Perhaps find should support both versions, and should have a user option to say which. (That is, it being find, it should have predicates to detect which, and then a sane default.) It begs the question of "what is the default", but whatever it is, it should be the same as is used by things like chmod -R and so forth. I'm inclined to say the default should be to work on all real subdirs, whether they label themselves with S_IFDIR or not. Thomas _______________________________________________ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd