mirror of
https://github.com/yuzu-emu/liftinstall.git
synced 2024-11-22 09:05:37 +01:00
Correctly set maintenance tool as executable on unix platforms
This commit is contained in:
parent
a174c265d4
commit
e7175ae880
@ -34,6 +34,7 @@ use config::Config;
|
||||
use http::stream_file;
|
||||
|
||||
use sources::types::Version;
|
||||
use std::fs::OpenOptions;
|
||||
|
||||
/// A message thrown during the installation of packages.
|
||||
#[derive(Serialize)]
|
||||
@ -364,7 +365,18 @@ impl InstallerFramework {
|
||||
|
||||
let new_app = path.join(platform_extension);
|
||||
|
||||
let mut new_app_file = match File::create(new_app) {
|
||||
let mut file_metadata = OpenOptions::new();
|
||||
file_metadata.write(true)
|
||||
.create_new(true);
|
||||
|
||||
#[cfg(unix)]
|
||||
{
|
||||
use std::os::unix::fs::OpenOptionsExt;
|
||||
|
||||
file_metadata.mode(0o770);
|
||||
}
|
||||
|
||||
let mut new_app_file = match file_metadata.open(new_app) {
|
||||
Ok(v) => v,
|
||||
Err(v) => return Err(format!("Unable to open installer binary: {:?}", v)),
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user