From 8c92e88765817877f53a9cfb70c3e39853456868 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 1 Oct 2019 14:39:13 -0700 Subject: [PATCH] Disable preserving mtimes on archives These are just wasted syscalls for our purposes, no need to issue updates to the modification/creation/access times of files we unpack! --- src/cargo/sources/registry/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cargo/sources/registry/mod.rs b/src/cargo/sources/registry/mod.rs index 533f987998b..dc543caef01 100644 --- a/src/cargo/sources/registry/mod.rs +++ b/src/cargo/sources/registry/mod.rs @@ -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()? {