fix: ensure _v2-entry-point is marked as executable

As far as I can tell, the file should always be executable, but one person was having issues
with both the backup and injected entry point file not having the execute bit.
This commit is contained in:
Sapphire 2025-07-08 15:12:44 -05:00 committed by Gabriele Musco
commit b0f0f4647c

View file

@ -2,7 +2,7 @@ use crate::{
paths::get_backup_dir, paths::get_backup_dir,
profile::Profile, profile::Profile,
util::{ util::{
file_utils::{copy_file, get_writer}, file_utils::{copy_file, get_writer, mark_as_executable},
steam_library_folder::SteamLibraryFolder, steam_library_folder::SteamLibraryFolder,
}, },
}; };
@ -50,6 +50,7 @@ pub fn restore_runtime_entrypoint() {
let backup = get_backup_runtime_entrypoint_location(); let backup = get_backup_runtime_entrypoint_location();
if Path::new(&backup).is_file() { if Path::new(&backup).is_file() {
copy_file(&backup, path); copy_file(&backup, path);
let _ = mark_as_executable(path);
} }
} }
} }
@ -78,6 +79,7 @@ pub fn set_runtime_entrypoint_launch_opts_from_profile(profile: &Profile) -> any
.join("\n"), .join("\n"),
dest, dest,
)?; )?;
mark_as_executable(dest)?;
return Ok(()); return Ok(());
} }