Skip to content

Commit

Permalink
Merge branch 'pr_5'
Browse files Browse the repository at this point in the history
Bugfix for text file issue (leonidessaguisagjr#4)
  • Loading branch information
cyanea-bt committed Jun 5, 2024
2 parents da39acb + 4198b71 commit 5fcfdba
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion filehash/filehash.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def verify_checksums(self, checksum_filename):
with open(checksum_filename, mode="r") as checksum_list:
for line in checksum_list:
expected_hash, filename = line.strip().split(" ", 1)
if filename.startswith("*"):
if filename.startswith("*") or filename.startswith(" "):
filename = filename[1:]
actual_hash = self.hash_file(filename)
result.append(VerifyHashResult(filename, expected_hash == actual_hash))
Expand Down
2 changes: 1 addition & 1 deletion testdata/hashes.md5
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
72f5d9e3a5fa2f2e591487ae02489388 *lorem_ipsum.txt
72f5d9e3a5fa2f2e591487ae02489388 lorem_ipsum.txt
860f55178330e675fb0d55ac1f2c27b2 *lorem_ipsum.zip
2 changes: 1 addition & 1 deletion testdata/hashes.sha1
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
f7ef3b7afaf1518032da1b832436ef3bbfd4e6f0 *lorem_ipsum.txt
f7ef3b7afaf1518032da1b832436ef3bbfd4e6f0 lorem_ipsum.txt
03da86258449317e8834a54cf8c4d5b41e7c7128 *lorem_ipsum.zip
2 changes: 1 addition & 1 deletion testdata/hashes.sha256
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
52ee30e57cc262b84ff73377223818825583b8120394ef54e9b4cd7dbec57d18 *lorem_ipsum.txt
52ee30e57cc262b84ff73377223818825583b8120394ef54e9b4cd7dbec57d18 lorem_ipsum.txt
8acac0dc358b981aef0dcecc6e6d8f4f1fb98968d61e613b430b2389d9d385e5 *lorem_ipsum.zip
2 changes: 1 addition & 1 deletion testdata/hashes.sha512
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
dfc4e13af6e57b4982bdac595e83804dcb2d126204baa290f19015982d13e822a07efa1f0e63a8078e10f219c69d26caf4f21a50e3dd5bdf09bea73dfe224e43 *lorem_ipsum.txt
dfc4e13af6e57b4982bdac595e83804dcb2d126204baa290f19015982d13e822a07efa1f0e63a8078e10f219c69d26caf4f21a50e3dd5bdf09bea73dfe224e43 lorem_ipsum.txt
edd841dd0ed5bb09fd21054de3aebbbd44d779beaa0289d63bfb64f0eaaa85c73993d5cbc0d0d1dfcc263d7bd8d43bdafe2bcc398cc8453823e50f0d90a3b0ff *lorem_ipsum.zip

0 comments on commit 5fcfdba

Please sign in to comment.