mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
GwR fix for stream-sourced epub
This commit is contained in:
parent
62c4f18bf6
commit
118b480fbe
@ -109,12 +109,10 @@ class OCFZipReader(OCFReader):
|
||||
raise EPubException("not a ZIP .epub OCF container")
|
||||
self.root = root
|
||||
if self.root is None:
|
||||
try:
|
||||
self.root = os.getcwdu()
|
||||
except:
|
||||
pass
|
||||
if hasattr(stream, 'name'):
|
||||
self.root = os.path.abspath(os.path.dirname(stream.name))
|
||||
else:
|
||||
self.root = os.getcwdu()
|
||||
super(OCFZipReader, self).__init__()
|
||||
|
||||
def open(self, name, mode='r'):
|
||||
|
Loading…
x
Reference in New Issue
Block a user