Skip to content

Commit e11f199

Browse files
authored
fix: wrong size on empty folder entries in zip archives (#1018)
1 parent f22e2c1 commit e11f199

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/archive/zip.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,8 @@ where
260260
io::copy(&mut file, &mut writer)?;
261261
}
262262
FileType::Directory => {
263-
writer.add_directory(entry_name, default_options)?;
263+
// Directory entries have no data and get an invalid size when ZIP64 is forced on
264+
writer.add_directory(entry_name, default_options.large_file(false))?;
264265
}
265266
FileType::Symlink => {
266267
let target_path = path.read_link()?;

0 commit comments

Comments
 (0)