|
|
@@ -46,11 +46,7 @@ def inserthierdict(d, name, obj, sep): |
|
|
|
dname = name[:i] |
|
|
|
rname = name[i + 1:] |
|
|
|
# remaining path components |
|
|
|
try: |
|
|
|
inserthierdict(d[dname], rname, obj, sep) |
|
|
|
except KeyError: |
|
|
|
d[dname] = {} |
|
|
|
inserthierdict(d[dname], rname, obj, sep) |
|
|
|
inserthierdict(d.setdefaul(dname, {}), rname, obj, sep) |
|
|
|
|
|
|
|
def buildNameHier(names, objs, sep): |
|
|
|
ret = {} |
|
|
@@ -308,8 +304,9 @@ class ZipObject(FSObject, StorageFolder): |
|
|
|
cnt = newsum |
|
|
|
self.sep = cursep |
|
|
|
|
|
|
|
hier = buildNameHier(nl, [ ZIWrap(x) for x in |
|
|
|
self.zip.infolist() ], cursep) |
|
|
|
il = self.zip.infolist() |
|
|
|
|
|
|
|
hier = buildNameHier(nl, [ ZIWrap(x) for x in il ], cursep) |
|
|
|
|
|
|
|
return hier |
|
|
|
|
|
|
|