-
Notifications
You must be signed in to change notification settings - Fork 234
change Enumerate* to Get* #616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change Enumerate* to Get* #616
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing it!
@@ -274,7 +274,7 @@ private IEnumerable<string> RecursivelyEnumerateFiles(string folderPath) | |||
{ | |||
foundFiles = | |||
foundFiles.Concat( | |||
Directory.EnumerateFiles( | |||
Directory.GetFiles( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While you're at it, can you add the check for PathTooLongException below using a catch exception filter:
catch (Exception ex) when {ex is UnauthorizedException || ex is PathTooLongException) { ... }
You might want to check DirectoryNotFoundException in case someone deletes a dir while we're searching.
@@ -278,10 +278,22 @@ private IEnumerable<string> RecursivelyEnumerateFiles(string folderPath) | |||
folderPath, | |||
pattern)); | |||
} | |||
catch (UnauthorizedAccessException e) | |||
catch (DirectoryNotFoundException e) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
As @daviwil mentioned in #612,
He was correct! Changing the Enumerates to Gets did the trick. Verified this on macOS by opening up a big workspace and finding all references/go to definition.
Resolves #612
Resolves PowerShell/vscode-powershell#908
Resolves daviwil/ide-powershell#1