rewrite check_files_md5 in pure Python - #643
Open
bdrung wants to merge 1 commit into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #643 +/- ##
==========================================
- Coverage 84.48% 84.47% -0.02%
==========================================
Files 106 106
Lines 21018 20996 -22
Branches 3195 3187 -8
==========================================
- Hits 17758 17736 -22
- Misses 2785 2786 +1
+ Partials 475 474 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
GNU coreutils 9.11 and rust-coreutils 0.9 changed `md5sum` to quote the filenames in case they contain spaces or other special characters. Example: ``` $ echo first > "with spaces" $ echo second > "with'quotes" $ echo third > 'with"quotes' $ echo fourth > "with \" and ' quotes" $ md5sum "with spaces" "with'quotes" 'with"quotes' "with \" and ' quotes" > sums $ md5sum -c sums 'with spaces': OK "with'quotes": OK 'with"quotes': OK 'with " and '\'' quotes': OK ``` This new quoting could be supported by checking for single or double quotes and use `shlex.split` in these cases. To make the code more robust do not rely on the `md5sum` command and just use pure Python for it. Bug: https://launchpad.net/bugs/2161957
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.
GNU coreutils 9.11 and rust-coreutils 0.9 changed
md5sumto quote the filenames in case they contain spaces or other special characters. Example:This new quoting could be supported by checking for single or double quotes and use
shlex.splitin these cases.To make the code more robust do not rely on the
md5sumcommand and just use pure Python for it.Bug: https://launchpad.net/bugs/2161957