Follow-up Comment #2, bug #23920 (project findutils):

My mistake.   I just read IEEE P1003.1 Draft 5.1 (that is, the current draft
of the POSIX spec), and it does not include find -path.  

Anyway, I think we can go further than you suggest; we can issue a warning
for -path ./src/emacs/ since it contains a trailing slash.   The warning would
be somewhat similar to the warning you get for -name a/b.

But yes, we should also improve the documentation. 

However, we also have a bug in the way that command-line arguments are
matched:
$ ls -ld 2008 2001
drwxr-xr-x 8 james james 4096 2008-09-06 11:57 2001
drwxr-xr-x 2 james james 4096 2008-09-06 12:10 2008
$ find 2008/ 2001/ -path 2008/ -o -path 2001
2008/
$ find 2008 2001 -path 2008/ -o -path 2001
2001
$ 

The first find command should have matched 2001 but not 2008, just like the
second find command actually did.

I'd guess this may also mean that -path foo/. and foo/.. and foo/../bar need
documenting (and perhaps some fixes).   We need not to break -path //foo/bar
versus ///foo/bar and /foo/bar as well, while we're at it.



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?23920>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



Reply via email to