Skip to content

[rm] -v: directory line lacks 'directory'; recursive verbose prints \\?\ absolute paths instead of operand paths #1328

Closed

Description

@caomengxuan666

Summary

Two probe-verified rm -v divergences (harness vs GNU, two runs):

  1. Directory wording. rm -rv d (d contains f):
    • GNU: removed 'd/f' then removed directory 'd'.
    • WinuxCmd: removed '...' for both — the directory line lacks directory.
  2. Recursive verbose output leaks internal extended paths. In the same run WinuxCmd prints the entries as \\?\Z:\home\...\d\f — the full absolute \\?\-prefixed path — where GNU prints the operand-relative path as traversed (d/f). Single-file rm -v a is correct (removed 'a'); the leak is in the recursive traversal printer, which formats the internal extended-path operand instead of the display path.

Source

src/commands/rm.cpp: recursive removal/verbose path (~L690-760, L927-980).

Regression seed

  • rm -rv d → expect exactly removed 'd/f' + removed directory 'd'.

Found by the full-audit. (Distinct from #1298: that is -v being ignored by rm/mkdir/rmdir in non-recursive paths.)

Activity

  1. added
    bug
    compat-gap
    on Oct 26, 2026
  2. caomengxuan666 commented on Oct 27, 2026

    @caomengxuan666
    MemberAuthor

    Fixed by #1404 (commit 699864a): rm -v uses GNU's directory wording ("removed directory 'd'") and prints operand-relative display paths instead of \\?\ extended paths. Regression pin rm_verbose_1328_recursive_paths landed with the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugcompat-gap

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions