find: fix pathnames printed by the SIGINFO handler

Don't duplicate the last component.

PR:		290362
Reported by:	John F. Carr <jfc@mit.edu>
Fixes:		d06a00963b
MFC after:	3 days
Reviewed by:	jilles, Goran Mekić <meka@tilda.center>
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1878
This commit is contained in:
Alan Somers 2025-10-19 09:53:50 -06:00
parent af445e1dd9
commit f6d767fe86

View file

@ -211,7 +211,7 @@ find_execute(PLAN *plan, char *paths[])
}
if (showinfo) {
fprintf(stderr, "Scanning: %s/%s\n", entry->fts_path, entry->fts_name);
fprintf(stderr, "Scanning: %s\n", entry->fts_path);
fprintf(stderr, "Scanned: %zu\n\n", counter);
showinfo = 0;
}