Skip to content

Commit

Permalink
don't set perms explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamc committed Nov 12, 2023
1 parent dac0adc commit 01d51a7
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/action/base/move_unpacked_nix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,24 +110,6 @@ impl Action for MoveUnpackedNix {
.map_err(|e| ActionErrorKind::Rename(entry.path(), entry_dest.to_owned(), e))
.map_err(Self::error)?;

let perms: Permissions = PermissionsExt::from_mode(0o555);
for entry_item in WalkDir::new(&entry_dest)
.into_iter()
.filter_map(Result::ok)
.filter(|e| !e.file_type().is_symlink())
{
tokio::fs::set_permissions(&entry_item.path(), perms.clone())
.await
.map_err(|e| {
ActionErrorKind::SetPermissions(
perms.mode(),
entry_item.path().to_owned(),
e,
)
})
.map_err(Self::error)?;
}

// Leave a back link where we copied from since later we may need to know which packages we actually transferred
// eg, know which `nix` version we installed when curing a user with several versions installed
tokio::fs::symlink(&entry_dest, entry.path())
Expand Down

0 comments on commit 01d51a7

Please sign in to comment.