Skip to content

Conversation

@skjha98
Copy link
Contributor

@skjha98 skjha98 commented Dec 25, 2025

Description
Fixes the GNU compatibility gap where mv -i fails to show the octal mode and permission string when prompting to overwrite a read-only file (GNU test i-3).

Key Changes

  • Logic: Added Unix permission check to mv.rs to detect files lacking owner-write bits.
  • Format: Used a invisible character (\u{200c}) in the octal string to prevent Fluent from stripping the leading zero (e.g., ensuring 0444 doesn't display as 444).
  • L10n: Added mv-prompt-overriding-mode to en-US and fr-FR locales.

Verification

  • Manual Verification:
    • Before: mv: overwrite 'dest'?
    • After: mv: overwrite 'dest', overriding mode 0400 (r--------)?
  • Compliance: clippy and fmt are clean.

@skjha98 skjha98 force-pushed the fix/mv-interactive-mode branch from 25bb328 to a3c766a Compare December 25, 2025 19:16
@github-actions
Copy link

GNU testsuite comparison:

Note: The gnu test tests/pr/pr-tests was skipped on 'main' but is now failing.

@ChrisDryden
Copy link
Collaborator

I have a similar pr for this, going to compare the two today later because I'm sure I've missed something #9599

@skjha98
Copy link
Contributor Author

skjha98 commented Dec 25, 2025

Thanks, @ChrisDryden I'm quite new to Rust and this is my second contribution to uutils (and open source in general), so I'm happy to learn from the comparison.

I put this together to address the GNU i-3 failure specifically. I also noticed that the Fluent engine strips leading zeros from octal numbers, so I used a invisible character(\u{200c}) as a workaround to keep it as 0444 instead of 444.

Looking forward to your thoughts!

@github-actions
Copy link

GNU testsuite comparison:

Note: The gnu test tests/printf/printf-surprise is now being skipped but was previously passing.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants