Skip to content

Commit 6e8920d

Browse files
committed
Fix sdist with long directories
1 parent e0b4dfe commit 6e8920d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

crates/uv-build-backend/src/source_dist.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,6 @@ impl DirectoryWriter for TarGzWriter {
285285
// Reasonable default to avoid 0o000 permissions, the user's umask will be applied on
286286
// unpacking.
287287
header.set_mode(0o644);
288-
header.set_cksum();
289288
self.tar
290289
.append_data(&mut header, path, Cursor::new(bytes))
291290
.map_err(|err| Error::TarWrite(self.path.clone(), err))?;
@@ -307,7 +306,6 @@ impl DirectoryWriter for TarGzWriter {
307306
header.set_mode(0o644);
308307
}
309308
header.set_size(metadata.len());
310-
header.set_cksum();
311309
let reader = BufReader::new(File::open(file)?);
312310
self.tar
313311
.append_data(&mut header, path, reader)
@@ -324,9 +322,8 @@ impl DirectoryWriter for TarGzWriter {
324322
.set_path(directory)
325323
.map_err(|err| Error::TarWrite(self.path.clone(), err))?;
326324
header.set_size(0);
327-
header.set_cksum();
328325
self.tar
329-
.append(&header, io::empty())
326+
.append_data(&mut header, directory, io::empty())
330327
.map_err(|err| Error::TarWrite(self.path.clone(), err))?;
331328
Ok(())
332329
}

0 commit comments

Comments
 (0)