Check-in [1955802108]
Overview
Comment:Fixed issue with opening directories returning wrong error
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:1955802108b6786731ecfb9ddf4152c915610ca4
User & Date: rkeene on 2010-09-26 04:49:25
Other Links: manifest | tags
Context
2010-09-26
04:49
Renamed patch to more appropriate name check-in: e0bcd16a13 user: rkeene tags: trunk
04:49
Fixed issue with opening directories returning wrong error check-in: 1955802108 user: rkeene tags: trunk
04:49
Updated to not remount TclKit VFS in initialization check-in: c7d604dff8 user: rkeene tags: trunk
Changes

Modified tclvfs/patches/all/tclvfs-20080503-zipvfs-clock_and_append_to_exe.diff from [776417ea28] to [9b98f84953].

     1         -Binary files tclvfs-20080503.orig//library/.zipvfs.tcl.swp and tclvfs-20080503-1rsk//library/.zipvfs.tcl.swp differ
     2         -diff -uNr tclvfs-20080503.orig//library/zipvfs.tcl tclvfs-20080503-1rsk//library/zipvfs.tcl
     3         ---- tclvfs-20080503.orig//library/zipvfs.tcl	2008-04-15 16:11:53.000000000 -0500
     4         -+++ tclvfs-20080503-1rsk//library/zipvfs.tcl	2010-09-10 06:48:25.026165002 -0500
     5         -@@ -255,21 +255,21 @@
            1  +diff -uNr tclvfs-20080503.orig/library/zipvfs.tcl tclvfs-20080503-3rsk/library/zipvfs.tcl
            2  +--- tclvfs-20080503.orig/library/zipvfs.tcl	2008-04-15 16:11:53.000000000 -0500
            3  ++++ tclvfs-20080503-3rsk/library/zipvfs.tcl	2010-09-19 03:37:33.000000000 -0500
            4  +@@ -107,6 +107,10 @@
            5  + 	    
            6  + 	    ::zip::stat $zipfd $name sb
            7  + 
            8  ++            if {$sb(ino) == -1} {
            9  ++                vfs::filesystem posixerror $::vfs::posix(EISDIR)
           10  ++            }
           11  ++
           12  + 	    set nfd [vfs::memchan]
           13  + 	    fconfigure $nfd -translation binary
           14  + 
           15  +@@ -255,21 +259,21 @@
     6     16        set year [expr { (($date >> 9) & 0xFF) + 1980 }]
     7     17    
     8     18        # Fix up bad date/time data, no need to fail
     9     19   -    while {$sec  > 59} {incr sec  -60}
    10     20   -    while {$min  > 59} {incr sec  -60}
    11     21   -    while {$hour > 23} {incr hour -24}
    12     22   -    if {$mday < 1}  {incr mday}
................................................................................
    30     40   -	# Only mday can be wrong, at end of month
    31     41   -	incr mday -1
    32     42        }
    33     43   +
    34     44        return $res
    35     45    }
    36     46    
    37         -@@ -400,6 +400,7 @@
           47  +@@ -400,6 +404,7 @@
    38     48    }
    39     49    
    40     50    proc zip::TOC {fd arr} {
    41     51   +    upvar #0 zip::$fd cb
    42     52        upvar 1 $arr sb
    43     53    
    44     54        set buf [read $fd 46]
    45         -@@ -410,6 +411,8 @@
           55  +@@ -410,6 +415,8 @@
    46     56          flen elen clen sb(disk) sb(attr) \
    47     57          sb(atx) sb(ino)
    48     58    
    49     59   +    set sb(ino) [expr {$cb(base) + $sb(ino)}]
    50     60   +
    51     61        if { ![string equal "PK\01\02" $hdr] } {
    52     62    	binary scan $hdr H* x
    53     63    	error "bad central header: $x"
    54         -@@ -442,7 +445,7 @@
           64  +@@ -442,7 +449,7 @@
    55     65    	
    56     66    	zip::EndOfArchive $fd cb
    57     67    
    58     68   -	seek $fd $cb(coff) start
    59     69   +	seek $fd [expr {$cb(base) + $cb(coff)}] start
    60     70    
    61     71    	set toc(_) 0; unset toc(_); #MakeArray
    62     72