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:
+12
-1
@@ -73,7 +73,7 @@ class InfoExtractor:
|
||||
sys.exit(1);
|
||||
|
||||
|
||||
self.currentindex = 0
|
||||
self.currentindex = -1
|
||||
|
||||
self.contents = InfoSimpleSplitter().splitinfo(self.file, infostream)
|
||||
|
||||
@@ -90,6 +90,17 @@ class InfoExtractor:
|
||||
|
||||
# Extract next in list
|
||||
def getnext(self, params):
|
||||
|
||||
if self.currentindex == -1:
|
||||
# Return "self" doc
|
||||
self.currentindex = 0
|
||||
self.em.setmimetype('text/plain')
|
||||
if len(self.contents) == 0:
|
||||
eof = rclexecm.RclExecM.eofnext
|
||||
else:
|
||||
eof = rclexecm.RclExecM.noteof
|
||||
return (True, "", "", eof)
|
||||
|
||||
if self.currentindex >= len(self.contents):
|
||||
self.em.rclog("getnext: EOF hit")
|
||||
return (False, "", "", rclexecm.RclExecM.eofnow)
|
||||
|
||||
Reference in New Issue
Block a user