atom-community / atom-community/autocomplete-paths
Fails when a project has recursive symlinks
- Dominant language
- JavaScript
- Stars
- 152
- Forks
- 57
- PR merge metrics
- No merged PRs in 30d
Description
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).
Contributor guide
Research direction
Reproduce the issue using the described project containing a symlink to its parent and an empty foo.js file. Trace the plugin's file-counting and directory traversal entry points; done should mean recursive symlinks no longer cause unbounded traversal or a false report that the repository contains more than 2000 files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100