mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
Actually catch only UnauthorizedAccessException.
This commit is contained in:
parent
a7079a3daf
commit
b5bfb07cb7
1 changed files with 4 additions and 3 deletions
|
@ -1,4 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
namespace LibHac
|
||||
|
@ -46,7 +47,7 @@ namespace LibHac
|
|||
{
|
||||
result.AddRange(GetFileSystemEntries(Path.Combine(Root, path), searchPattern));
|
||||
}
|
||||
catch { /**/ }
|
||||
catch (UnauthorizedAccessException) { /* Skip this directory */ }
|
||||
|
||||
if (searchOption == SearchOption.TopDirectoryOnly)
|
||||
return result.ToArray();
|
||||
|
@ -58,7 +59,7 @@ namespace LibHac
|
|||
{
|
||||
result.AddRange(GetFileSystemEntries(search, searchPattern, searchOption));
|
||||
}
|
||||
catch { /**/ }
|
||||
catch (UnauthorizedAccessException) { /* Skip this result */ }
|
||||
}
|
||||
|
||||
return result.ToArray();
|
||||
|
|
Loading…
Reference in a new issue