autocomplete-paths icon indicating copy to clipboard operation
autocomplete-paths copied to clipboard

Fails when a project has recursive symlinks

Open SimonSimCity opened this issue 7 years ago • 3 comments
trafficstars

I found one specific reason for the file-count exceeding 2000 files:

You only need a symlink that points to the parent folder and thereby create a recursive symlink-chain. This is how my test-project looked like:

drwxr-xr-x   4 simon  admin  128 Dec 13 14:57 .
drwxr-xr-x  12 simon  admin  384 Dec 13 14:57 ..
lrwxr-xr-x   1 simon  admin    3 Dec 13 14:57 folder -> ../
-rw-r--r--   1 simon  admin    0 Dec 13 14:57 foo.js

If you open a folder having these two files (the symlink and an empty file), this plugin will complain about too many files being in your repository.

This could be a reason for #164 :wink:

Would it be possible to create an option to ignore symlinks here? Or at least count the number of parent-folder-calls against the folders it enters, so you don't track recursive links (if you get what I mean ... at least not further as to the second level).

SimonSimCity avatar Dec 13 '17 11:12 SimonSimCity

Hello. I was troubled by this issue. I pulled a request, it will solve it. https://github.com/atom-community/autocomplete-paths/pull/195

phphe avatar Dec 24 '17 01:12 phphe

@SimonSimCity you can use this https://atom.io/packages/autocomplete-paths-ignore-circle-symlinks

phphe avatar Dec 25 '17 05:12 phphe

There are better ways to detect recursive symlinks: https://unix.stackexchange.com/questions/99159/is-there-an-algorithm-to-decide-if-a-symlink-loops/99166#99166

We should use that instead of ignoring symlinks altogether.

aminya avatar Nov 04 '20 10:11 aminya