Skip to content

Commit cdca308

Browse files
committed
.
1 parent 31db704 commit cdca308

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/tarballer.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,12 @@ impl Tarballer {
6363
}
6464
for path in files {
6565
let src = Path::new(&self.work_dir).join(&path);
66-
let src = src.canonicalize().unwrap_or_else(|_| src.to_owned());
66+
let src = src
67+
.parent()
68+
.unwrap()
69+
.canonicalize()
70+
.map(|path| path.join(src.file_name().unwrap()))
71+
.unwrap_or_else(|_| src.to_owned());
6772
append_path(&mut builder, &src, &path)
6873
.with_context(|| format!("failed to tar file '{}'", src.display()))?;
6974
}

0 commit comments

Comments
 (0)