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

-sumRelativePath parameter is ignored #28

Closed That-Annoying-Guy closed 1 year ago

That-Annoying-Guy commented 1 year ago

Using Default Blake3 HashAlgo with RelativePath: -sumRelativePath is ignored "C:\Temp\DirHash.exe" "C:\Temp\LOGS" -t C:\temp\Blake3_SumRel.log -sumRelativePath -overwrite

Results:

"C:\Temp\DirHash.exe" "C:\Temp\LOGS" -t C:\temp\Blake3_SumRel.log -sumRelativePath -overwrite

DirHash 1.23.0 by Mounir IDRASSI (mounir@idrix.fr) Copyright 2010-2021

Recursively compute hash of a given directory content in lexicographical order.
It can also compute the hash of a single file.

Supported Algorithms :
 MD5 SHA1 SHA256 SHA384 SHA512 Streebog Blake2s Blake2b Blake3

Using Blake3 to compute hash of "C:\Temp\LOGS" ...
Blake3 (32 bytes) = E20A922C22A34C37103DBF3CF6C336EE72AAD3123F4A19349BE6475B7B0CE9A6

It should have been a list of hashes and file paths similar to using -sum but with relative paths

idrassi commented 1 year ago

The documentation says this about -sumRelativePath:

if -sumRelativePath is specified (only when -sum is specified), the file paths are stored in the output file as relative to the input directory.

This means that -sumRelativePathis only taken into account when -sum is specified.

So, to solve your issue, simply add -sum to the arguments and it will work.

That-Annoying-Guy commented 1 year ago

confirmed. the following works:

"C:\Temp\DirHash.exe" "C:\Temp\LOGS" -t C:\temp\Blake3_SumRel.log -sum -sumRelativePath -overwrite

Now I have checking issues..

idrassi commented 1 year ago

Don't hesitate to open a new issue if you find a bug in verification.