yatima1460 / Drill

Search files without indexing, but fast crawling
https://drill.software/
GNU General Public License v2.0
268 stars 21 forks source link

Drill fails if it encounters a broken link #2

Closed famellad closed 5 years ago

famellad commented 5 years ago

Description The program fails spectacularly when it encounters a broken link, in all fairness, this is great for finding broken links

To Reproduce

  1. Create a file link
  2. Delete the file, but not the link
  3. Watch drill crash and burn

Expected behavior The broken link should be ignored

Screenshots image

Desktop:

yatima1460 commented 5 years ago

os.follow_symlinks = False and mount points are iterated using psutil, this should not happen anymore, let me know

yatima1460 commented 5 years ago

also it needs a discussion if to set os.follow_symlinks = False or not

v0idpwn commented 5 years ago

well it should not break even with following symlinks enabled

RustyRaptor commented 5 years ago

if following symlinks is enabled we should have a function limit the depth of it.

yatima1460 commented 5 years ago

following symlinks is ok, the problem is how to prevent loops

maybe distinguish files using the inode number?

yatima1460 commented 5 years ago

but I wonder if following symlinks is important to find user data

yatima1460 commented 5 years ago

mount points are never symlinks right?

RustyRaptor commented 5 years ago

No they aren't. Hasn't stopped people from trying though apparently.

https://unix.stackexchange.com/questions/49014/using-a-symlink-for-a-mountpoint

yatima1460 commented 5 years ago

Switched to D and rewritten the crawling system, let me know if this still happens

yatima1460 commented 5 years ago

Tested with 1.0.0, can confirm it's fixed