fsearch
fsearch copied to clipboard
Duplicate files
If two of the database locations lead to a file, the file shows up twice. If ~ and ~/uni are locations in the data base, files in ~/uni show up twice in the list. I accidentally did that and couldn't figure out why all of the files were showing up twice :| I don't know if the issue is worth fixing thou, just thought I should report it anyway.
EDIT: added a screenshot of the issue
Hi, yes this issue is already known to me. I just haven't figured out how to deal with it properly. Currently it works just like in Everything: items appear multiple times.
So here are the ways I can think of how this can be handled:
- leave it as it is, i.e. if you include a sub-directory of an already included directory you get duplicates
- don't allow the inclusion of sub-directories of already included directories (might cause problems when I add support to watch directories for changes)
- just don't show duplicates (maybe configurable with a config entry)
The third one sounds the most reasonable to me. It's a small problem anyway, so it might be more useful to spend time on other stuff but that's just my opinion.
I'm facing this too and I too vote for the 3rd option.
I freshly installed FSearch on Ubuntu 18.04, the only included directory is /
and I'm getting search results in duplicate. The annoying thing is that on another system I have the same FSearch preferences set and duplicates are gone. I did something there a few months ago, but I don't remember what.
I would appreciate any clues.
I would understand that fsearch shows duplicates if there is a symlink pointing to the folder, but strangely, if I search by the original path it ALSO shows every folder/file. So the following searches deliver the same (duplicate) results although I would only expect duplicates in the second case: /mnt/data/documents/ /home/user/documents/ (symlink to the folder above)
I'm having the same duplicate problem, searching for .vimrc and get 8 results.. 2 duplicates for every answer.
@aindriu80 the easiest solution is to simply remove one of the redundant included folders you have in the database configuration. You likely have both /
and /home/$user
included. So disabling/removing the /home/$user
entry will fix the issue.
Like I said in an earlier comment, preventing such duplicates isn't easy, because all solutions have downsides. For example allowing the user to include the same folders (or parent-child combos) and just hiding the duplicates will increase memory usage and will slow down either the scan process or the search performance.
Hence I'm actually quite happy with current approach, because it simplifies the code a lot.