diff options
author | TSRBerry <20988865+TSRBerry@users.noreply.github.com> | 2023-12-04 19:16:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-04 19:16:34 +0100 |
commit | 93a24afaaabd9f511e37c33b9e92544236297299 (patch) | |
tree | 3ac08b08349d971eda7058c638b0843a59c24159 | |
parent | 5ce47bfe8c4a2adcf0b665cc78ea31c99a5918d0 (diff) |
ApplicationLibrary: Skip invalid symlinks (#6004)1.1.1097
-rw-r--r-- | src/Ryujinx.Ui.Common/App/ApplicationLibrary.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Ryujinx.Ui.Common/App/ApplicationLibrary.cs b/src/Ryujinx.Ui.Common/App/ApplicationLibrary.cs index 46f29851..950eb55b 100644 --- a/src/Ryujinx.Ui.Common/App/ApplicationLibrary.cs +++ b/src/Ryujinx.Ui.Common/App/ApplicationLibrary.cs @@ -136,6 +136,13 @@ namespace Ryujinx.Ui.App.Common if (!fileInfo.Attributes.HasFlag(FileAttributes.Hidden) && extension is ".nsp" or ".pfs0" or ".xci" or ".nca" or ".nro" or ".nso") { var fullPath = fileInfo.ResolveLinkTarget(true)?.FullName ?? fileInfo.FullName; + + if (!File.Exists(fullPath)) + { + Logger.Warning?.Print(LogClass.Application, $"Skipping invalid symlink: {fileInfo.FullName}"); + continue; + } + applications.Add(fullPath); numApplicationsFound++; } |