bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Savannah bug 18466 (-execdir in new find executable in 4.3.x runs in


From: Eric Blake
Subject: Re: Savannah bug 18466 (-execdir in new find executable in 4.3.x runs in wrong directory)
Date: Mon, 22 Jan 2007 06:14:30 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.9) Gecko/20061207 Thunderbird/1.5.0.9 Mnenhy/0.7.4.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to James Youngman on 1/22/2007 4:06 AM:
> Hello all,
> 
> Unfortunately Savannah bug 18466 (http://savannah.gnu.org/bugs/?18466)
> is still not fixed in CVS.   However, Eric has a patch which does fix
> the problem, and the patch is attached to that bug.  The current CVS
> code for findutils 4.3.x includes a test for this bug (which therefore
> currently fails, of course).

Actually, my patch is reported not to work, either.  The following report
came to the cygwin list, where my patch was applied in the cygwin release
version:

| % mkdir -p /tmp/a/b/c
| % touch /tmp/a/b/a{1,2}
| % find /tmp/a -type f -print -execdir pwd {} +
| /tmp/a/b/a1
| /tmp/a/b/a2
| pwd: ignoring non-option arguments
| /tmp/a/b/c
|
| The last output should have been /tmp/a/b, not /tmp/a/b/c.
|
| % oldfind /tmp/a -type f -print -execdir pwd {} +
| /tmp/a/b/a1
| /tmp/a/b/a2
| pwd: ignoring non-option arguments
| /tmp/a/b
|
| If /tmp/a/b/c is removed, it works correctly.
|
| % rmdir /tmp/a/b/c
| % find /tmp/a -type f -print -execdir pwd {} +
| /tmp/a/b/a1
| /tmp/a/b/a2
| pwd: ignoring non-option arguments
| /tmp/a/b
|
| It also works correctly if the files come after the directory.
|
| % mkdir /tmp/a/b/a0
| % find /tmp/a -type f -print -execdir pwd {} +
| /tmp/a/b/a1
| /tmp/a/b/a2
| pwd: ignoring non-option arguments
| /tmp/a/b
|

I really think that the only way to properly fix this is to switch over to
using the FTS_CWDFD flag of gnulib fts, but as that is a more invasive
patch, I have not had time to attempt that myself.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFtLi284KuGfSFAYARAvx5AJ9RFqRzYPkaxcpc7nTqLk9//qIn0wCffoGz
enUbn7qGb2c6veBRsohIfJk=
=ycFI
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]