projects
/
tclvfs
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7272cfc
)
Fix for #92 vfs::zip unable to read zip archives with wrong modes
master
author
Wojciech Kocjan
<zoro2@users.sourceforge.net>
Mon, 10 Mar 2014 11:40:46 +0000
(11:40 +0000)
committer
Wojciech Kocjan
<zoro2@users.sourceforge.net>
Mon, 10 Mar 2014 11:40:46 +0000
(11:40 +0000)
library/zipvfs.tcl
patch
|
blob
|
history
diff --git
a/library/zipvfs.tcl
b/library/zipvfs.tcl
index 7cb00a65d7aaa61b37f08f4cc40f67cef5345a79..80900ac20c50caa937d6ce0a6d9ef5cf4b8ec6d8 100644
(file)
--- a/
library/zipvfs.tcl
+++ b/
library/zipvfs.tcl
@@
-89,6
+89,11
@@
proc vfs::zip::stat {zipfd name} {
if {($sb(mode) & 0xf000) == 0x2000} {
set sb(mode) [expr {$sb(mode) ^ 0x2000}]
}
if {($sb(mode) & 0xf000) == 0x2000} {
set sb(mode) [expr {$sb(mode) ^ 0x2000}]
}
+ # workaround for certain errorneus zip archives
+ if {($sb(mode) & 0xffff) == 0xffff} {
+ # change to directory type and set mode to 0777 + directory flag
+ set sb(mode) 0x41ff
+ }
array get sb
}
array get sb
}