From 93a24afaaabd9f511e37c33b9e92544236297299 Mon Sep 17 00:00:00 2001 From: TSRBerry <20988865+TSRBerry@users.noreply.github.com> Date: Mon, 4 Dec 2023 19:16:34 +0100 Subject: [PATCH] ApplicationLibrary: Skip invalid symlinks (#6004) --- src/Ryujinx.Ui.Common/App/ApplicationLibrary.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Ryujinx.Ui.Common/App/ApplicationLibrary.cs b/src/Ryujinx.Ui.Common/App/ApplicationLibrary.cs index 46f29851cc..950eb55b4b 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++; }