Repository navigation
shred: keep numeric-looking file names verbatim in messages - #15604
Merged
Merged
Conversation
The error and verbose messages passed file names to translate!, which hands any value that parses as a number to Fluent as a number, so a directory named "007" was reported as "7" and "1e3" as "1000". Use translate_text! for the messages that carry a file name, so they are printed as given, like GNU shred. Found with behave (https://github.com/emirmrkaljevic/behave).
Contributor
|
Thanks for your PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #15533
shredpassed file names totranslate!, which hands any value that parses as a number to Fluent as a number, so numeric-looking names were reformatted in errors and-voutput:This switches the messages that carry a file name (including the "couldn't rename" message, whose new name is all zeros) to
translate_text!, the same fix as in #15534, #15541, #15544, #15548 and #15565. The message wording itself is unchanged here.Tests: rstest cases for the error path and a
-v -ucase; they fail on main and pass with the fix.Found with behave.