File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
src/PowerShellEditorServices/Workspace Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -278,10 +278,22 @@ private IEnumerable<string> RecursivelyEnumerateFiles(string folderPath)
278
278
folderPath ,
279
279
pattern ) ) ;
280
280
}
281
- catch ( UnauthorizedAccessException e )
281
+ catch ( DirectoryNotFoundException e )
282
282
{
283
283
this . logger . WriteException (
284
- $ "Could not enumerate files in the path '{ folderPath } ' due to a file not being accessible",
284
+ $ "Could not enumerate files in the path '{ folderPath } ' due to a path being an invalid path",
285
+ e ) ;
286
+ }
287
+ catch ( PathTooLongException e )
288
+ {
289
+ this . logger . WriteException (
290
+ $ "Could not enumerate files in the path '{ folderPath } ' due to a path being too long",
291
+ e ) ;
292
+ }
293
+ catch ( Exception e ) when ( e is SecurityException || e is UnauthorizedAccessException )
294
+ {
295
+ this . logger . WriteException (
296
+ $ "Could not enumerate files in the path '{ folderPath } ' due to a path not being accessible",
285
297
e ) ;
286
298
}
287
299
}
You can’t perform that action at this time.
0 commit comments