[bug #61501] find -execdir wrong root item path

anonymous <[email protected]>
Newsgroups gmane.comp.gnu.findutils.bugs
Message-ID <[email protected]>
URL:
  <https://savannah.gnu.org/bugs/?61501>

                 Summary: find -execdir wrong root item path
                 Project: findutils
            Submitted by: None
            Submitted on: Wed 17 Nov 2021 04:39:21 PM UTC
                Category: find
                Severity: 3 - Normal
              Item Group: Wrong result
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: Skeleton Zombie
        Originator Email: [email protected]
             Open/Closed: Open
                 Release: None
         Discussion Lock: Any
           Fixed Release: 4.8.0

    _______________________________________________________

Details:

find -execdir gives the wrong path for the root item

$ find . -execdir printf '%s\n' '{}' ';'
./.       # expect "."
./apple
./banana

$ find /foo -execdir printf '%s\n' '{}' ';'
./foo     # expect "."
./apple
./banana


for -exec the result is correct

$ find . -exec printf '%s\n' '{}' ';'
.
./apple
./banana

$ find /foo -exec printf '%s\n' '{}' ';'
/foo
/foo/apple
/foo/banana


Thanks and Greetings





    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61501>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.