@@ -378,7 +378,7 @@ static public List<FileInfo> GetFiles(string folder, string pattern = "*")
378378 {
379379 return new List < FileInfo > ( ) ;
380380 }
381- catch ( PathTooLongException ex )
381+ catch ( DirectoryNotFoundException ex )
382382 {
383383 return new List < FileInfo > ( ) ;
384384 }
@@ -397,7 +397,7 @@ static public List<FileInfo> GetFiles(string folder, string pattern = "*")
397397 catch ( UnauthorizedAccessException ex )
398398 {
399399 }
400- catch ( PathTooLongException ex )
400+ catch ( DirectoryNotFoundException ex )
401401 {
402402 }
403403
@@ -440,7 +440,7 @@ static public List<FileInfo> GetFiles(string folder, Func<FileInfo, bool> isVali
440440 {
441441 return new List < FileInfo > ( ) ;
442442 }
443- catch ( PathTooLongException ex )
443+ catch ( DirectoryNotFoundException ex )
444444 {
445445 return new List < FileInfo > ( ) ;
446446 }
@@ -461,7 +461,7 @@ static public List<FileInfo> GetFiles(string folder, Func<FileInfo, bool> isVali
461461 catch ( UnauthorizedAccessException ex )
462462 {
463463 }
464- catch ( PathTooLongException ex )
464+ catch ( DirectoryNotFoundException ex )
465465 {
466466 }
467467
@@ -620,7 +620,7 @@ static private List<DirectoryInfo> GetStartDirectories(string folder, Concurrent
620620 {
621621 return new List < DirectoryInfo > ( ) ;
622622 }
623- catch ( PathTooLongException ex )
623+ catch ( DirectoryNotFoundException ex )
624624 {
625625 return new List < DirectoryInfo > ( ) ;
626626 }
@@ -656,7 +656,7 @@ static private List<DirectoryInfo> GetStartDirectories(string folder, Concurrent
656656 {
657657 return new List < DirectoryInfo > ( ) ;
658658 }
659- catch ( PathTooLongException ex )
659+ catch ( DirectoryNotFoundException ex )
660660 {
661661 return new List < DirectoryInfo > ( ) ;
662662 }
0 commit comments