Repository navigation
WIP: winx3-fileops — cp/mv/rm/rmdir/mkdir/chmod GNU fixes (#1324–#1331) - #1404
Conversation
…argv (#1325) A -t/--suffix value containing i/n/f letters no longer rewrites the overwrite mode. Regression test: mv_overwrite_1325_target_value_not_scanned. Verification pending: Wine mini-harness probes (build slot).
…-u weak (#1326) GNU 9.4 measured rule: explicit --update=VALUE forms are last-wins among themselves and beat -u/bare --update in either order. Regression test: mv_update_1326_explicit_beats_u. Note: bare --update and --update= are indistinguishable in the parser (both store empty); the empty form stays 'older' (documented gap). Verification pending: Wine mini-harness probes (build slot).
… prompt (#1327) Prompts name the item kind (regular file / regular empty file / symbolic link / directory) via i18n keys command.rm.prompt.*, drop the (y/n) suffix, skip the descend prompt for empty directories, prompt for the directory itself after recursion, and never prompt for a missing operand. Existing prompt presence checks updated to the typed wording. New tests: rm_interactive_1327_typed_prompts / _missing_operand_no_prompt / _empty_dir_no_descend / _full_sequence. i18n catalog sync (unixwin/winuxcmd-i18n) is an integration follow-up. Verification pending: Wine mini-harness probes (build slot).
…ths (#1328) Recursive -v output now reads removed 'd/f' then removed directory 'd' (GNU wording), and a display path is threaded through the recursion so prompts/verbose lines no longer leak \\?\ extended paths. Regression test: rm_verbose_1328_recursive_paths. Verification pending: Wine mini-harness probes (build slot).
…#1330) mode_allows_write now evaluates symbolic modes properly (base 0777, who/op/perms clauses, copy letters, empty perms) instead of substring heuristics that rejected e.g. u+rwx. Parse failures report 'invalid mode'. Regression test: mkdir_mode_1330_symbolic. Note: GNU measures u+rwx as 0777, not 0700 as the issue text claimed. Verification pending: Wine mini-harness probes (build slot).
…ty perms (#1331) parse_symbolic_mode now returns clause lists: who once, then (op, perms) pairs; a perms segment is empty, all [rwxXst], or exactly one [ugo] copy letter (mixed is invalid). Display and owner-write application handle copy semantics. Regression tests: chmod_symbolic_1331_copy_and_multiop. Out of scope (noted): omitted-who umask masking. Verification pending: Wine mini-harness probes (build slot).
# Conflicts: # tests/unit/mkdir/mkdir_unit_test.cpp # tests/unit/mv/mv_unit_test.cpp # tests/unit/rm/rm_unit_test.cpp
) - chmod -v now prints the 9-char permission string GNU prints, dropping the type bit exactly like coreutils chmod.c does with &perms[1] ("changed from 0644 (rw-r--r--) to 0664 (rw-rw-r--)"); the 1331 pin asserted the GNU form while the implementation emitted the ls -l style 10-char form. - rm_interactive_1327_missing_operand_no_prompt keyed its no-prompt assertion on the bare word "remove", which the cannot-remove diagnostic itself contains; key on the prompt's trailing "'? " so the assertion actually distinguishes prompt from diagnostic. - Rebuild the rm test tail that the main merge interleaved (1298 long-verbose body had 1327 assertions spliced in; the 1328 recursive-paths pin carried a duplicated 1298 tail).
|
Verified post-merge (origin/main @ 1854504): MSVC Debug build green; cp/mv/rm/rmdir/mkdir/chmod unit tests 165/165; full ctest 3238 — the 11 residuals are exactly the environment-bound baseline set (3x issue_1288 LongPathsEnabled=0, find.issue_1309_ls, 7x xargs CONIN$). Merge notes: the three conflicted test files (mkdir/mv/rm) all had tail interleaving — rebuilt so every test function is byte-identical to one parent side (1297/1298 from main kept whole, 1327/1328 branch tests kept whole). Two verification-debt fixes on top (the cluster's pending adjudication):
i18n: en adds the three #1327 rm prompt keys + 'removed directory ' (#1328), drops the four superseded prompt/wording keys. Synced on winuxcmd-i18n sync/winx3-fileops-i18n (zh-CN translated, VERSION 0.6.29). |
# Conflicts: # tests/unit/cp/cp_unit_test.cpp
Draft PR for the winx3-fileops cluster (cp/mv/rm/rmdir/mkdir/chmod), tracking WinuxCmd #1324–#1331. Fixes are committed per issue as they take shape; verification (Wine mini-harness probes vs GNU coreutils 9.4) is still in progress — do not merge yet.
Progress:
All committed sources are byte-identical to the cluster's desk-verified reference files. Local-only build harness adaptations (mingw/Wine verification) are intentionally NOT part of these commits.