bug#80856: [PATCH] chcon, chmod, chown, rm: improve fts_read failure diagnostic

Shubham Chakraborty <[email protected]> Sun, 19 Apr 2026 02:52:01 +0530
Newsgroups gmane.comp.gnu.core-utils.bugs
Message-ID <CABvxksxoA8T10Eedriokmh_nmU+0Kute2ViBt_Z_3z1Ot3x5Jg@mail.gmail.com>
Dear Paul,

Thank you for your feedback. You are correct that fts_read does not
guarantee that fts_path remains valid after a failure. My initial approach
relied on unspecified behavior, which could lead to unreliable results.

As a more robust alternative, I suggest tracking the last successfully
visited path to provide context when reporting an error.

Would you consider this approach acceptable, or do you have a preferred
method for improving the diagnostics in these cases? I am happy to revise
the patch and resubmit it for review.

Best regards,

Shubham Chakraborty


On Sun, 19 Apr, 2026, 2:22 am Paul Eggert, <[email protected]> wrote:

> I thought that fts_path had unreliable contents after fts_read fails,
> which would mean the proposed patch would lead to unreliable behavior.
> What am I missing?
>