Skip to content

Commit

Permalink
[rust] Force executable permission for extracted drivers
Browse files Browse the repository at this point in the history
  • Loading branch information
bonigarcia committed Aug 9, 2023
1 parent b43135b commit 13d6954
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rust/src/files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ pub fn unzip(
{
use std::os::unix::fs::PermissionsExt;

if let Some(mode) = file.unix_mode() {
if single_file.is_some() {
fs::set_permissions(&target_path, fs::Permissions::from_mode(0o755))?;
} else if let Some(mode) = file.unix_mode() {
fs::set_permissions(&target_path, fs::Permissions::from_mode(mode))?;
}
}
Expand Down

0 comments on commit 13d6954

Please sign in to comment.