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

Extra % character when folder/filename has % character and -sum and -threads are used #19

Closed comanche closed 3 years ago

comanche commented 3 years ago

System: Windows 10 Pro 21H1 64-bit DirHash Version: 1.19.0

There is an extra % character when the folder name or file name has the % character AND -sum -threads options are used.

Steps to reproduce:

Create a this folder and file with random content: D:\60%\60%.txt

Use DirHash to generate a hash for this folder.

dirhash.exe D:\60% blake3 -sum -threads

We will get the following result:

F4B53E56E7F35050BDC921194867D1008CF7EF8229CFA2483389448801E92E2E  D:\60%%\60%%.txt

If we generate a result file (using -t) and verify it, the file D:\60%%\60%%.txt is not found.

Open the result file in a text editor and change D:\60%%\60%%.txt to D:\60%\60%.txt.

Verification should now pass.

idrassi commented 3 years ago

Thank you for reporting this issue. It's a regression caused by the fix of #17. I have come up with a better implementation of #17 fix which fixes this regression.

I have published version 1.20 that includes this fix.