use just last part of pathname in the tar
Previously: ``` $ curl -s http://localhost:8000/target/release/build.tar -o - | tar tf - target/release/build/rayon-core-b8ae11d289218da3 … ``` Now: ``` $ curl -s http://localhost:8000/target/release/build.tar -o - | tar tf - build/rayon-core-b8ae11d289218da3 … ```
This commit is contained in:
parent
de0040512b
commit
62a99f8dc3
1 changed files with 2 additions and 1 deletions
|
@ -11,8 +11,9 @@ pub fn run_tar_in_thread(path: PathBuf) -> futures::sync::mpsc::UnboundedReceive
|
|||
|
||||
thread::spawn(move || {
|
||||
let mut a = tar::Builder::new(writer);
|
||||
let last_path_component = path.file_name().unwrap();
|
||||
a.mode(tar::HeaderMode::Deterministic);
|
||||
a.append_dir_all(path.clone(), path);
|
||||
a.append_dir_all(last_path_component, &path);
|
||||
a.finish();
|
||||
});
|
||||
stream
|
||||
|
|
Loading…
Add table
Reference in a new issue