+2009-01-21 Andreas Kupries <andreask@activestate.com>
+
+ * pkgIndex.tcl.in: Incremented version of vfs::zip
+ * library/zipvfs.tcl (zip::EndOfArchive): Fixed Schelte Bron's
+ [Bug 2256740]. Trigger on outermost magic sequence, not an inner
+ sequence from a n uncompressed zip archive stored in the zip.
+
2008-12-22 Pat Thoyts <patthoyts@users.sourceforge.net>
* library/mk4vfs.tcl: Fix vfs::ztream to support 8.6 core zlib
# Removed provision of the backward compatible name. Moved to separate
# file/package.
-package provide vfs::zip 1.0.2
+package provide vfs::zip 1.0.3
package require vfs
seek $fd $n end
set hdr [read $fd $len]
- set pos [string first "PK\05\06" $hdr]
+
+ # We are using 'string last' as we are searching the first
+ # from the end, which is the last from the beginning. See [SF
+ # Bug 2256740]. A zip archive stored in a zip archive can
+ # confuse the unmodified code, triggering on the magic
+ # sequence for the inner, uncompressed archive.
+ set pos [string last "PK\05\06" $hdr]
if {$pos == -1} {
if {$at >= $sz} {
return -code error "no header found"
# New, for the old, keep version numbers synchronized.
package ifneeded vfs::mk4 1.10.1 [list source [file join $dir mk4vfs.tcl]]
-package ifneeded vfs::zip 1.0.2 [list source [file join $dir zipvfs.tcl]]
+package ifneeded vfs::zip 1.0.3 [list source [file join $dir zipvfs.tcl]]
# New
package ifneeded vfs::ftp 1.0 [list source [file join $dir ftpvfs.tcl]]