From: Jeff Hobbs Date: Fri, 4 Jun 2004 19:21:56 +0000 (+0000) Subject: * library/zipvfs.tcl (zip::Data): add zip::stat call that X-Git-Tag: vfs-1-4~94 X-Git-Url: https://privyetmir.co.uk/gitweb.cgi?a=commitdiff_plain;h=141937690f485f6002fc1ba1fb3ce969fad4c5a6;p=tclvfs * library/zipvfs.tcl (zip::Data): add zip::stat call that correctly determines size for some zip files (Ferril). --- 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)] }