mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2025-02-09 13:14:46 +01:00
Actually catch only UnauthorizedAccessException.
This commit is contained in:
parent
a7079a3daf
commit
b5bfb07cb7
@ -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…
x
Reference in New Issue
Block a user