Skip to content

Commit

Permalink
Finalize perms fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kobaltcore committed Jan 23, 2024
1 parent 0358dff commit 003d3f9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/renutil.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use anyhow::Result;
use lol_html::{element, HtmlRewriter, Settings};
use std::env;
use std::io::Cursor;
#[cfg(target_family = "unix")]
use std::os::unix::fs::PermissionsExt;
use std::path::Path;
use std::process::Command;
Expand Down Expand Up @@ -434,9 +435,7 @@ pub async fn install(
"Setting executable permissions for {}.",
path.to_string_lossy()
);
let mut perms = fs::metadata(path)?.permissions();
perms.set_mode(0o755);
std::fs::set_permissions(path, perms)?;
fs::set_permissions(path, fs::Permissions::from_mode(0o755)).unwrap();
}

let original_dir = env::current_dir()?;
Expand Down

0 comments on commit 003d3f9

Please sign in to comment.