From 90aea7862bfb547aed331f90f0eec70b186cafaf Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 29 Apr 2026 07:08:06 -0400 Subject: [PATCH] added icloud check (thanks neo!) --- src/Ryujinx/Program.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/Ryujinx/Program.cs b/src/Ryujinx/Program.cs index 796e582c5..2317d67d2 100644 --- a/src/Ryujinx/Program.cs +++ b/src/Ryujinx/Program.cs @@ -137,15 +137,25 @@ namespace Ryujinx.Ava return 0; } - string downloadsPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Downloads"); + string downloadFiles = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Downloads"); - if (Environment.CurrentDirectory.StartsWithIgnoreCase(downloadsPath)) + if (Environment.CurrentDirectory.StartsWithIgnoreCase(downloadFiles)) { Logger.Error?.PrintMsg(LogClass.Application, "Ryujinx is not intended to be run from the Downloads folder. Exiting..."); macOSNativeInterop.SimpleMessageBox($"Ryujinx {Version}", "Ryujinx is not intended to be run from the Downloads folder.", "Ok"); return 0; } + + string icloudFiles = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Library/Mobile Documents/com~apple~CloudDocs"); + + if (Environment.CurrentDirectory.StartsWithIgnoreCase(icloudFiles)) + { + Logger.Error?.PrintMsg(LogClass.Application, "Ryujinx is not intended to be run from the iCloud folder. Exiting..."); + macOSNativeInterop.SimpleMessageBox($"Ryujinx {Version}", + "Ryujinx is not intended to be run from the iCloud folder.", "Ok"); + return 0; + } } if (OperatingSystem.IsLinux())