Arrange so we can now open the parent of a document (e.g. chm file instead of temp copy of html page inside chm), even when the parent is itself embedded in an archive
This commit is contained in:
+6
-1
@@ -22,7 +22,7 @@ class WarExtractor:
|
||||
|
||||
###### File type handler api, used by rclexecm ---------->
|
||||
def openfile(self, params):
|
||||
self.currentindex = 0
|
||||
self.currentindex = -1
|
||||
try:
|
||||
self.tar = tarfile.open(params["filename:"])
|
||||
return True
|
||||
@@ -40,6 +40,11 @@ class WarExtractor:
|
||||
return self.extractone(tarinfo)
|
||||
|
||||
def getnext(self, params):
|
||||
if self.currentindex == -1:
|
||||
# Return "self" doc
|
||||
self.currentindex = 0
|
||||
return (True, "", "", rclexecm.RclExecM.noteof)
|
||||
|
||||
tarinfo = self.tar.next()
|
||||
if tarinfo is None:
|
||||
#self.em.rclog("getnext: EOF hit")
|
||||
|
||||
Reference in New Issue
Block a user