Don't follow symlinks when creating tarball

Closes #11
This commit is contained in:
Diego Giagio 2018-10-17 00:58:03 +02:00
parent d78ecaf00f
commit 4cf163f484

View File

@ -90,6 +90,7 @@ fn create_tgz(dir: &Path, out: &Path) -> io::Result<()> {
let f = fs::File::create(out)?; let f = fs::File::create(out)?;
let gz = GzEncoder::new(f, Compression::best()); let gz = GzEncoder::new(f, Compression::best());
let mut tar = tar::Builder::new(gz); let mut tar = tar::Builder::new(gz);
tar.follow_symlinks(false);
tar.append_dir_all(".", dir)?; tar.append_dir_all(".", dir)?;
Ok(()) Ok(())
} }