Skip to content

Commit 6344b27

Browse files
committed
Use GNU format tarballs to support longer paths
This fixes errors related to paths being too long, which is common when using git dependencies. Note that cargo itself switched from UStar to GNU format in 2020 or so: rust-lang/cargo#8453. thread 'main' panicked at src/main.rs:290:32: called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: "provided value is too long when setting path for some-crate-0.123.123/src/" }
1 parent deb4204 commit 6344b27

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ fn build_ar(ar: &mut Builder<GzEncoder<File>>, pkg: &Package, config: &GlobalCon
282282
relative
283283
);
284284

285-
let mut header = Header::new_ustar();
285+
let mut header = Header::new_gnu();
286286
let metadata = file.metadata().unwrap();
287287
header.set_path(&path).unwrap();
288288
header.set_metadata(&metadata);

0 commit comments

Comments
 (0)