checksumdir
checksumdir copied to clipboard
Include path option is relative to the main folder.
Due to this commit we might be sure that the folder structure is considered different when files are in the different subdirectories. For example:
Environment:
> mkdir -p /tmp/subdir
> touch /tmp/subdir/a.txt
Was:
> checksumdir -p /tmp
74be16979710d4c4e7c6647856088456
> checksumdir -p /tmp/subdir
74be16979710d4c4e7c6647856088456
The hashes are the same although we are checking /tmp/subdir/a.txt
in first case and subdir/a.txt
in the latter.
Now it will be:
> checksumdir -p /tmp
f956ecf8ffe9798427114d9b69400ce5
> checksumdir -p /tmp/subdir
0ec539fca957e328003429f8f741c7b1
Different checksum, because the relative paths are different.
This way we may find the same folder structure.