Skip to content

Commit

Permalink
Disable preserving mtimes on archives
Browse files Browse the repository at this point in the history
These are just wasted syscalls for our purposes, no need to issue
updates to the modification/creation/access times of files we unpack!
  • Loading branch information
alexcrichton committed Oct 1, 2019
1 parent f4d1b77 commit 8c92e88
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/cargo/sources/registry/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ impl<'cfg> RegistrySource<'cfg> {

let gz = GzDecoder::new(tarball);
let mut tar = Archive::new(gz);
tar.set_preserve_mtime(false);
let prefix = unpack_dir.file_name().unwrap();
let parent = unpack_dir.parent().unwrap();
for entry in tar.entries()? {
Expand Down

0 comments on commit 8c92e88

Please sign in to comment.