aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjcm <john.moody@coloradocollege.edu>2024-02-11 17:10:21 -0600
committerGitHub <noreply@github.com>2024-02-12 00:10:21 +0100
commit904a5ffcb4d7339efed24156409e67b58c0e77bc (patch)
tree8aebbecf61901ffbd559ef61a03f50a36c7fd0f0
parent946633276b557a8e522b5e09790c9827cf51f8d6 (diff)
Handle exceptions when checking user data directory for symlink (#6304)1.1.1192
Co-authored-by: jcm <butt@butts.com>
-rw-r--r--src/Ryujinx.Common/Configuration/AppDataManager.cs11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/Ryujinx.Common/Configuration/AppDataManager.cs b/src/Ryujinx.Common/Configuration/AppDataManager.cs
index 26b587da..deaa03de 100644
--- a/src/Ryujinx.Common/Configuration/AppDataManager.cs
+++ b/src/Ryujinx.Common/Configuration/AppDataManager.cs
@@ -233,8 +233,15 @@ namespace Ryujinx.Common.Configuration
// Should be removed, when the existence of the old directory isn't checked anymore.
private static bool IsPathSymlink(string path)
{
- FileAttributes attributes = File.GetAttributes(path);
- return (attributes & FileAttributes.ReparsePoint) == FileAttributes.ReparsePoint;
+ try
+ {
+ FileAttributes attributes = File.GetAttributes(path);
+ return (attributes & FileAttributes.ReparsePoint) == FileAttributes.ReparsePoint;
+ }
+ catch
+ {
+ return false;
+ }
}
[SupportedOSPlatform("macos")]