Fix unhandled UnauthorizedAccessException causing crash while listing directories
This commit is contained in:
parent
e590262531
commit
f4ec4a5b0e
1 changed files with 22 additions and 17 deletions
|
@ -51,6 +51,8 @@ namespace Ryujinx.Ui
|
|||
// Builds the applications list with paths to found applications
|
||||
List<string> applications = new List<string>();
|
||||
foreach (string appDir in appDirs)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!Directory.Exists(appDir))
|
||||
{
|
||||
|
@ -68,10 +70,13 @@ namespace Ryujinx.Ui
|
|||
(Path.GetExtension(app).ToLower() == ".nro") ||
|
||||
(Path.GetExtension(app).ToLower() == ".nso"))
|
||||
{
|
||||
|
||||
applications.Add(app);
|
||||
numApplicationsFound++;
|
||||
|
||||
}
|
||||
}
|
||||
} catch (UnauthorizedAccessException) { }
|
||||
}
|
||||
|
||||
// Loops through applications list, creating a struct and then firing an event containing the struct for each application
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue