rewrite check_files_md5 in pure Python - #643
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #643 +/- ##
==========================================
- Coverage 84.49% 84.45% -0.04%
==========================================
Files 106 106
Lines 21018 20996 -22
Branches 3195 3187 -8
==========================================
- Hits 17759 17733 -26
- Misses 2785 2791 +6
+ Partials 474 472 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Hyask
approved these changes
Aug 18, 2026
Hyask
left a comment
Contributor
There was a problem hiding this comment.
Approved because your changes keep the current logic, but that function is super brittle and would need some rework.
bdrung
force-pushed
the
md5sum
branch
2 times, most recently
from
August 18, 2026 12:17
eecf74e to
0f4a950
Compare
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
Member
Author
|
Just rebased. |
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