Linux: Fix file picker not launching from disabling core dumps

Core dumps are disabled by default on Linux, but this prevents access to the file picker due to security hardening. To work around this, core dumps are selectively enabled and disabled around the file picker tasks.
This commit is contained in:
KeatonTheBot
2026-01-12 16:14:39 -06:00
parent 1b3bf1473d
commit cfa22a7957
9 changed files with 124 additions and 2 deletions

View File

@@ -288,6 +288,8 @@ namespace Ryujinx.Ava.UI.ViewModels
public async void Add()
{
OsUtils.SetCoreDumpable(true);
IReadOnlyList<IStorageFolder> result = await _storageProvider.OpenFolderPickerAsync(new FolderPickerOpenOptions
{
Title = LocaleManager.Instance[LocaleKeys.SelectModDialogTitle],
@@ -298,6 +300,11 @@ namespace Ryujinx.Ava.UI.ViewModels
{
AddMod(new DirectoryInfo(folder.Path.LocalPath));
}
if (!Program.CoreDumpArg)
{
OsUtils.SetCoreDumpable(false);
}
}
public void DeleteAll()