idrassi / DirHash

Windows command line utility to compute hash of directories and files
BSD 3-Clause "New" or "Revised" License
111 stars 11 forks source link

Using the -sum Option with a File That Has "%20S" In Its Name Will Stop Execution #17

Closed comanche closed 3 years ago

comanche commented 3 years ago

The following two conditions will stop DirHash from executing further:

  1. Use the -sum option
  2. Have %20S in filename

Steps to recreate.

Create a folder called a

Create these files with random content:

  1. a.txt
  2. b%20S.txt
  3. c.txt

Hash the directory

dirhash.exe D:\a blake3 -sum

You'll get an output like the following:

...
FE10E1CCC1A5AC0364F136ED545D86749F2503DBF384FACF4D5826BE7AD4B790  D:\a\a.txt
C0948545CB92369893D57F63B1AAE4F2DE0AD3A1CBF7332F6F6B8ACBFA6E6EBE  D:\a\b

You'll notice the following:

  1. The file name should be D:\a\b%20S.txt instead of D:\a\b
  2. It never gets to c.txt
idrassi commented 3 years ago

Thank you for discovering this bug. I have fixed it and I have released version 1.19 that includes the fix. I will close this issue. Don't hesitate to reopen if you encounter it again.