mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-31 12:35:51 +00:00
fix(relinker): write Linux and macOS executables with execute permission
The executables were written with the default file mode (0644 under a 022 umask). The documented chmod covered app.elf, but not the outputs of --executable, so RetroArch (PPSA99169) converted with --executable picker/picker.bin --executable es-de/es-de.bin stopped as soon as it started its picker: sceSystemServiceLoadExec: execv failed: Permission denied Every executable output now gets execute permission for owner, group and others after it is written, as --autorun already did for app.elf. With it RetroArch starts the picker, and the picker starts ES-DE.
This commit is contained in:
1 parent
115dc95784
commit
ab94ee21d7
1 file changed
+5
@@ -194,6 +194,11 @@ int Run(const int argc, char* argv[]) {
|
||||
}
|
||||
for (const auto& executable : executables) {
|
||||
fileWriter.Write(executable.OutputPath, executable.Bytes);
|
||||
if (!args.toWindows) {
|
||||
std::error_code error;
|
||||
std::filesystem::permissions(Io::NativePath(executable.OutputPath), std::filesystem::perms::owner_exec | std::filesystem::perms::group_exec | std::filesystem::perms::others_exec, std::filesystem::perm_options::add, error);
|
||||
if (error) throw Domain::RelinkerException("Cannot make the output executable: " + executable.OutputPath + " (" + error.message() + ")");
|
||||
}
|
||||
progress.Report({Domain::ProgressStage::Write, absPath, ++written, outputCount});
|
||||
}
|
||||
if (args.writeRegistry) {
|
||||
|
||||
Reference in new issue
Block a user