Skip to content

Commit

Permalink
[rust] Unwrap or default when setting permissions of downloaded files
Browse files Browse the repository at this point in the history
  • Loading branch information
bonigarcia committed Aug 7, 2023
1 parent 474e058 commit 160d101
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rust/src/files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ pub fn unzip(
if single_file.is_some() {
fs::set_permissions(&out_path, fs::Permissions::from_mode(0o755))?;
} else if let Some(mode) = file.unix_mode() {
fs::set_permissions(&out_path, fs::Permissions::from_mode(mode)).unwrap();
fs::set_permissions(&out_path, fs::Permissions::from_mode(mode))
.unwrap_or_default();
}
}
}
Expand Down

0 comments on commit 160d101

Please sign in to comment.