about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/tools/rust-installer/Cargo.toml2
-rw-r--r--src/tools/rust-installer/src/tarballer.rs5
2 files changed, 3 insertions, 4 deletions
diff --git a/src/tools/rust-installer/Cargo.toml b/src/tools/rust-installer/Cargo.toml
index 38b81a1baac..788e556b0c6 100644
--- a/src/tools/rust-installer/Cargo.toml
+++ b/src/tools/rust-installer/Cargo.toml
@@ -13,7 +13,7 @@ path = "src/main.rs"
 anyhow = "1.0.19"
 flate2 = "1.0.1"
 rayon = "1.0"
-tar = "0.4.13"
+tar = "0.4.38"
 walkdir = "2"
 xz2 = "0.1.4"
 num_cpus = "1"
diff --git a/src/tools/rust-installer/src/tarballer.rs b/src/tools/rust-installer/src/tarballer.rs
index 592eba8f698..7353a49fe03 100644
--- a/src/tools/rust-installer/src/tarballer.rs
+++ b/src/tools/rust-installer/src/tarballer.rs
@@ -1,6 +1,6 @@
 use anyhow::{bail, Context, Result};
 use std::fs::{read_link, symlink_metadata};
-use std::io::{empty, BufWriter, Write};
+use std::io::{BufWriter, Write};
 use std::path::Path;
 use tar::{Builder, Header};
 use walkdir::WalkDir;
@@ -93,8 +93,7 @@ fn append_path<W: Write>(builder: &mut Builder<W>, src: &Path, path: &String) ->
     header.set_metadata(&stat);
     if stat.file_type().is_symlink() {
         let link = read_link(src)?;
-        header.set_link_name(&link)?;
-        builder.append_data(&mut header, path, &mut empty())?;
+        builder.append_link(&mut header, path, &link)?;
     } else {
         if cfg!(windows) {
             // Windows doesn't really have a mode, so `tar` never marks files executable.