From 141937690f485f6002fc1ba1fb3ce969fad4c5a6 Mon Sep 17 00:00:00 2001 From: Jeff Hobbs Date: Fri, 4 Jun 2004 19:21:56 +0000 Subject: [PATCH] * library/zipvfs.tcl (zip::Data): add zip::stat call that correctly determines size for some zip files (Ferril). --- library/zipvfs.tcl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/library/zipvfs.tcl b/library/zipvfs.tcl index 3052521..253c442 100644 --- a/library/zipvfs.tcl +++ b/library/zipvfs.tcl @@ -282,6 +282,16 @@ proc zip::Data {fd arr {varPtr ""} {verify 0}} { if { $varPtr == "" } { seek $fd $sb(csize) current } else { + # Added by Chuck Ferril 10-26-03 to fix reading of OpenOffice + # .sxw files. Any files in the zip that had a method of 8 + # (deflate) failed here because size and csize were zero. + # I'm not sure why the above computes the size and csize + # wrong, but stat appears works properly. I originally + # checked for csize of zero, but adding this change didn't + # appear to break the none deflated file access and seemed + # more natural. + zip::stat $fd $sb(name) sb + set data [read $fd $sb(csize)] } -- 2.23.0