Skip to content

Commit

Permalink
Fixed: Chmod the .desktop file
Browse files Browse the repository at this point in the history
  • Loading branch information
Sewer56 committed Sep 20, 2024
1 parent db00cda commit 4f8dd68
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions source/Reloaded.Mod.Installer.Lib/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,30 @@ private static void LinuxTryMarkAsExecutable(string windowsPath)
{
windowsPath = windowsPath.Replace('\\', '/');
windowsPath = windowsPath.Replace("Z:", "");
try { Process.Start($"chmod +x \"{windowsPath}\""); }
catch (Exception) { /* ignored */ }
var processInfo = new ProcessStartInfo
{
FileName = "cmd.exe",
Arguments = $"/c start Z:/bin/chmod +x \"{windowsPath}\"",
UseShellExecute = true,
CreateNoWindow = true
};
try
{
Process.Start(processInfo);
}
catch (Exception)
{
// If the first attempt fails, try with the alternative path
processInfo.Arguments = $"/c start Z:/usr/bin/chmod +x \"{windowsPath}\"";
try
{
Process.Start(processInfo);
}
catch (Exception)
{
// Both attempts failed
}
}
}

private static void OverrideInstallLocationForProton(Settings settings, string protonTricksSuffix, out string nativeInstallFolder, out string? userName)
Expand Down

0 comments on commit 4f8dd68

Please sign in to comment.