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