File tree 1 file changed +8
-2
lines changed
src/PowerShellEditorServices/Language
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 13
13
using System . Management . Automation ;
14
14
using System . Management . Automation . Language ;
15
15
using System . Runtime . InteropServices ;
16
+ using System . Security ;
16
17
using System . Threading ;
17
18
using System . Threading . Tasks ;
18
19
@@ -346,9 +347,14 @@ public async Task<FindReferencesResult> FindReferencesOfSymbol(
346
347
{
347
348
scriptFile = workspace . GetFile ( file ) ;
348
349
}
349
- catch ( IOException )
350
+ catch ( Exception e ) when ( e is IOException
351
+ || e is SecurityException
352
+ || e is FileNotFoundException
353
+ || e is DirectoryNotFoundException
354
+ || e is PathTooLongException
355
+ || e is UnauthorizedAccessException )
350
356
{
351
- // If the file has ceased to exist for some reason, we just skip it
357
+ // If we can't access the file for some reason, just ignore it
352
358
continue ;
353
359
}
354
360
You can’t perform that action at this time.
0 commit comments