[libgsf] zip: if an zip member uses zip64, make sure the archive has zip64 trailer.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgsf] zip: if an zip member uses zip64, make sure the archive has zip64 trailer.
- Date: Sun, 30 Nov 2014 19:25:34 +0000 (UTC)
commit be750b9224f26897466148d23cb09fe1a3bac145
Author: Morten Welinder <terra gnome org>
Date: Sun Nov 30 14:12:41 2014 -0500
zip: if an zip member uses zip64, make sure the archive has zip64 trailer.
I'm not actually sure that is required, but it should not hurt.
xs
ChangeLog | 3 +++
gsf/gsf-outfile-zip.c | 5 +++++
2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6cf8aa0..22035ca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@
* gsf/gsf-outfile-zip.c (gsf_outfile_zip_write): When zip64 is
forced off, don't allow writing beyond the 4G barrier.
+ (zip_header_write): If we write a real zip64 entry, mark the
+ dirent as being zip64.
+ (zip_close_root): If any dirent is zip64, the archive is.
2014-11-29 Morten Welinder <terra gnome org>
diff --git a/gsf/gsf-outfile-zip.c b/gsf/gsf-outfile-zip.c
index 2e01982..56bd7e9 100644
--- a/gsf/gsf-outfile-zip.c
+++ b/gsf/gsf-outfile-zip.c
@@ -324,6 +324,8 @@ zip_close_root (GsfOutput *output)
GsfZipDirent *dirent = child->vdir->dirent;
if (!zip_dirent_write (zip->sink, dirent))
return FALSE;
+ if (dirent->zip64 == TRUE)
+ zip64 = TRUE;
}
dirend = gsf_output_tell (zip->sink);
@@ -562,6 +564,9 @@ zip_header_write (GsfOutfileZip *zip)
g_string_free (extras, TRUE);
+ if (real_zip64)
+ dirent->zip64 = TRUE;
+
return ret;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]