Thank you for this very useful tool! :heart:
I think I found a small bug.
Description
Not knowing for sure what dupd scan would scan by default, I issued dupd scan --hidden -p .. This led dupd report to show paths like this: /path/to/cwd/./some-file (note that ./ in the middle).
I didn't think much of it, until I tried to run dupd ls or dupd file on a file that I knew (from the report output) to be duplicate.
Expected behaviour
Files listed in the output of dupd report are reported as DUPLICATE by dupd ls and dupd file.
Actual behaviour
All files queried are considered UNIQUE.
Suspected cause
dupd performs path-based matches that don't normalize the path, and so /path/to/cwd/./some-file is treated as distinct from /path/to/cwd/some-file, and so when dupd scan made an index with . in the path, dupd file can't find any matches for a given input file.
I have verified this theory by running dupd file -f /path/to/cwd/./some-file (with the ./ explicitly) and this did lead to a DUPLICATE match.
Thank you for this very useful tool! :heart: I think I found a small bug.
Description
Not knowing for sure what
dupd scan
would scan by default, I issueddupd scan --hidden -p .
. This leddupd report
to show paths like this:/path/to/cwd/./some-file
(note that./
in the middle).I didn't think much of it, until I tried to run
dupd ls
ordupd file
on a file that I knew (from the report output) to be duplicate.Expected behaviour
Files listed in the output of
dupd report
are reported as DUPLICATE bydupd ls
anddupd file
.Actual behaviour
All files queried are considered UNIQUE.
Suspected cause
dupd
performs path-based matches that don't normalize the path, and so/path/to/cwd/./some-file
is treated as distinct from/path/to/cwd/some-file
, and so whendupd scan
made an index with.
in the path,dupd file
can't find any matches for a given input file.I have verified this theory by running
dupd file -f /path/to/cwd/./some-file
(with the./
explicitly) and this did lead to a DUPLICATE match.