We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 18d9d44 commit 877e8d4Copy full SHA for 877e8d4
src/tools/rust-installer/src/tarballer.rs
@@ -53,8 +53,11 @@ impl Tarballer {
53
// Sort files by their suffix, to group files with the same name from
54
// different locations (likely identical) and files with the same
55
// extension (likely containing similar data).
56
- let (dirs, mut files) = get_recursive_paths(&self.work_dir, &self.input)
+ // Sorting of file and directory paths also helps with the reproducibility
57
+ // of the resulting archive.
58
+ let (mut dirs, mut files) = get_recursive_paths(&self.work_dir, &self.input)
59
.context("failed to collect file paths")?;
60
+ dirs.sort();
61
files.sort_by(|a, b| a.bytes().rev().cmp(b.bytes().rev()));
62
63
// Write the tar into both encoded files. We write all directories
0 commit comments