Follow-up Comment #4, bug #17782 (project findutils):
WANG Yunfeng in http://bugs.debian.org/385896
> Follow-up Comment #1:
>
> Prefixing the expansion of {} with ./ is a security feature. I'm not
> planning to remove it.
>
> However, as Andreas points out the actual bug here is that arguments
> containing {} are prefixed with ./ at the start of the argument, even if
the
> {} is not at the start of the argument. Example:
>
>
> $ find baz -execdir echo 'foo {}' \;
> ./foo baz
Here we need a little more consideration. Thinking about this situation:
Under current directory exists some file whose name looks like `bashrc',
and I want to rename it to `.bashrc', so I would probably run:
$ find . -name "[^.]*rc" -execdir mv {} .{} \;
According to patch file sv-bug-17782.patch, this will result in a command
like `mv ./bashrc ../bashrc', which is definitely not expected.
As a compromise, I suggest to provide an option, say `-suppress_prefix',
to disable this feature for those who really don't need it with -execdir,
while enable it by default for the general purpose invokation.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?17782>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-findutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-findutils