File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/tools/rust-installer/src Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -53,8 +53,11 @@ impl Tarballer {
53
53
// Sort files by their suffix, to group files with the same name from
54
54
// different locations (likely identical) and files with the same
55
55
// extension (likely containing similar data).
56
- let ( dirs, mut files) = get_recursive_paths ( & self . work_dir , & self . input )
56
+ // 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 )
57
59
. context ( "failed to collect file paths" ) ?;
60
+ dirs. sort ( ) ;
58
61
files. sort_by ( |a, b| a. bytes ( ) . rev ( ) . cmp ( b. bytes ( ) . rev ( ) ) ) ;
59
62
60
63
// Write the tar into both encoded files. We write all directories
You can’t perform that action at this time.
0 commit comments