Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed Jul 18, 2021
1 parent 31db704 commit cdca308
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/tarballer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,12 @@ impl Tarballer {
}
for path in files {
let src = Path::new(&self.work_dir).join(&path);
let src = src.canonicalize().unwrap_or_else(|_| src.to_owned());
let src = src
.parent()
.unwrap()
.canonicalize()
.map(|path| path.join(src.file_name().unwrap()))
.unwrap_or_else(|_| src.to_owned());
append_path(&mut builder, &src, &path)
.with_context(|| format!("failed to tar file '{}'", src.display()))?;
}
Expand Down

0 comments on commit cdca308

Please sign in to comment.