czkawka icon indicating copy to clipboard operation
czkawka copied to clipboard

Cannot find symbolic links with duplicate names

Open newhoa opened this issue 2 years ago • 3 comments

If this should work or I am overlooking something I apologize.

When I search for duplicate files by name, symbolic links (both absolute and relative) do not show when they have the same names. In this example I've copied two of both types of symlinks. So there should be 2 duplicate matches returned. But czkawka doesn't show these as duplicates and returns 0 matches.

cz-symlinks

newhoa avatar Apr 19 '22 13:04 newhoa

For now app doesn't follow symbolic links and finds only unique or hardlinked files.

Currently due used algorithm it is not possible to follow symlinked folders due recursion problem but with files this may not be a problem

qarmin avatar Apr 19 '22 18:04 qarmin

Hello! I also ran into this issue with symlinks when trying out czkawka today. I'm using git-annex to store most of my media files: In brief, the way it works is by storing symlinks in the git repository to locations inside the .git/annex directory, so I was unfortunately unable to use czkawka at all due to this limitation. Personally, I think that adding an option to allow following of symlinks to files (but not directories) would be a great addition

Xaldew avatar May 08 '22 13:05 Xaldew

Just to clarify -- this specific issue isn't requesting to follow symlinks. Just to acknowledge symlinks themselves in the duplicate name results. In the original example:

ex

There are two separate duplicates: symlink-absolute-to-file.txt symlink-relative-to-file.txt

They are duplicate names because they share the same name, not because of the file they point to (the file they point to doesn't matter in this issue). I believe actually following the symlinks would give 4 duplicates, one for each symlink to file.txt (or maybe 5 results if you include file.txt) and count as a single result. That would be a nice feature but that's not the issue I was raising here. Might be better to make its own new issue for that one, I think it's a more complicated issue (it might require a separate search mode).

The issue posted here is just because symlinks themselves aren't shown in the already existing Duplicate Files -> Name mode search results, even if they share the same name.

newhoa avatar May 08 '22 14:05 newhoa