From 5e708c83fae0e0a8286802ec83c3ca4625eb4e20 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 28 Apr 2026 12:46:40 -0400 Subject: [PATCH] added downloads folder check --- src/Ryujinx/Program.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Ryujinx/Program.cs b/src/Ryujinx/Program.cs index 697b51a57..796e582c5 100644 --- a/src/Ryujinx/Program.cs +++ b/src/Ryujinx/Program.cs @@ -136,6 +136,16 @@ namespace Ryujinx.Ava "Ryujinx is not intended to be run as administrator.", "Ok"); return 0; } + + string downloadsPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Downloads"); + + if (Environment.CurrentDirectory.StartsWithIgnoreCase(downloadsPath)) + { + 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; + } } if (OperatingSystem.IsLinux())