patbenatar / vscode-advanced-new-file

Create files anywhere in your workspace from the keyboard
MIT License
78 stars 30 forks source link

Ignore symbolic links when loading directories #102

Open matthewmcgarvey opened 2 years ago

matthewmcgarvey commented 2 years ago

Fixes #74

The only difference between statSync and lstatSync is that the latter handles symbolic links while the former causes an error. Then we can ignore symbolic links.

https://nodejs.org/api/fs.html#fslstatpath-options-callback

devo-wm commented 2 years ago

Confirming this changes resolved my issue as well! Would love to get this merged in :)

patbenatar commented 2 years ago

@matthewmcgarvey Thanks for the fix! Sorry for my delay in getting to this -- I don't have much time to support this plugin these days. I've gone ahead and given you push access to this repo if you're interested in helping maintain it.

It'd be great if we could add test coverage for this change. I started down that path but realized I haven't run the development environment for this project in a long time and looks like things have changed wrt how VS Code extensions are tested (https://code.visualstudio.com/api/working-with-extensions/testing-extension#migrating-from-vscode).

matthewmcgarvey commented 2 years ago

@patbenatar Appreciate it! I'll try to figure out the testing thing