mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-18 20:42:01 +00:00
Handle exceptions when checking user data directory for symlink (#6304)
Co-authored-by: jcm <butt@butts.com>
This commit is contained in:
parent
946633276b
commit
904a5ffcb4
1 changed files with 9 additions and 2 deletions
|
@ -233,8 +233,15 @@ namespace Ryujinx.Common.Configuration
|
||||||
// Should be removed, when the existence of the old directory isn't checked anymore.
|
// Should be removed, when the existence of the old directory isn't checked anymore.
|
||||||
private static bool IsPathSymlink(string path)
|
private static bool IsPathSymlink(string path)
|
||||||
{
|
{
|
||||||
FileAttributes attributes = File.GetAttributes(path);
|
try
|
||||||
return (attributes & FileAttributes.ReparsePoint) == FileAttributes.ReparsePoint;
|
{
|
||||||
|
FileAttributes attributes = File.GetAttributes(path);
|
||||||
|
return (attributes & FileAttributes.ReparsePoint) == FileAttributes.ReparsePoint;
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[SupportedOSPlatform("macos")]
|
[SupportedOSPlatform("macos")]
|
||||||
|
|
Loading…
Reference in a new issue