aboutsummaryrefslogtreecommitdiff
path: root/unittests/Utility/Inputs
diff options
context:
space:
mode:
authorJitendra Bhati <bhatijitendra2022@gmail.com>2026-08-15 15:03:56 +0000
committerAlan Somers <asomers@FreeBSD.org>2026-08-16 21:02:43 +0000
commitc1ff9c93b107ef54b332bab114191e0a90ca84b7 (patch)
tree647d70d372cd3e9557e6d0bc70e3217e83e93878 /unittests/Utility/Inputs
parent95a4412e3a4d41b430f298ea2c2a51f8aa119c2c (diff)
fts: fix trailing-slash regression in fts_read after fts_childrenHEADmain
When fts_read() descends into a directory whose children were already prefetched by fts_children() (as ls -R does), it changed directory using p->fts_name instead of p->fts_accpath. With a trailing slash on a relative root path (e.g. 'dir/'), the bare name was resolved relative to the wrong directory, so every sibling directory after the first failed with ENOENT and was reported as FTS_DNR. This manifested as 'ls -lR dir/' skipping the contents of all but the first subdirectory. Restore the use of p->fts_accpath, matching the behavior prior to 4bd01d6ae016. Add a regression test that reproduces the exact conditions: fts_children() on each directory, FTS_PHYSICAL without FTS_NOCHDIR, and a trailing slash on the root path. Reported by: Michael Butler <imb@protected-networks.net> Reviewed by: asomers Fixes: 4bd01d6ae016 Sponsored by: Google LLC (GSoC 2026) Pull Request: https://github.com/freebsd/freebsd-src/pull/2372
Diffstat (limited to 'unittests/Utility/Inputs')
0 files changed, 0 insertions, 0 deletions