aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Shala <daniel.shala08@gmail.com>2023-04-15 18:11:24 +0200
committerGitHub <noreply@github.com>2023-04-15 16:11:24 +0000
commit5c89e22bb98072adc240c2eb2d26d25fa119fe7d (patch)
treee84a5f9ba13ae3a46a029143a5794bd640b2e2fc
parent11ecff2ff04633d261b9a43db792f6438df63f40 (diff)
Added check for eventual symlink when displaying game files. (#4526)1.1.710
* Added check for eventual symlink when displaying game files. * Moved symlink check logic * Moved symlink check logic * Fixed prev commit --------- Co-authored-by: Daniel Shala <danielshala00@gmail.com>
-rw-r--r--Ryujinx.Ui.Common/App/ApplicationLibrary.cs11
1 files changed, 7 insertions, 4 deletions
diff --git a/Ryujinx.Ui.Common/App/ApplicationLibrary.cs b/Ryujinx.Ui.Common/App/ApplicationLibrary.cs
index 8686383e..66cb7c73 100644
--- a/Ryujinx.Ui.Common/App/ApplicationLibrary.cs
+++ b/Ryujinx.Ui.Common/App/ApplicationLibrary.cs
@@ -116,11 +116,13 @@ namespace Ryujinx.Ui.App.Common
return;
}
- string extension = Path.GetExtension(app).ToLower();
+ var fileInfo = new FileInfo(app);
+ string extension = fileInfo.Extension.ToLower();
- if (!File.GetAttributes(app).HasFlag(FileAttributes.Hidden) && extension is ".nsp" or ".pfs0" or ".xci" or ".nca" or ".nro" or ".nso")
+ if (!fileInfo.Attributes.HasFlag(FileAttributes.Hidden) && extension is ".nsp" or ".pfs0" or ".xci" or ".nca" or ".nro" or ".nso")
{
- applications.Add(app);
+ var fullPath = fileInfo.ResolveLinkTarget(true)?.FullName ?? fileInfo.FullName;
+ applications.Add(fullPath);
numApplicationsFound++;
}
}
@@ -904,4 +906,5 @@ namespace Ryujinx.Ui.App.Common
return (null, null);
}
}
-} \ No newline at end of file
+}
+