mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
ce9d5f4104
commit
eb1adb69de
@ -522,7 +522,7 @@ class DirContainer(object):
|
||||
if path is None:
|
||||
path = self.opfname
|
||||
path = os.path.join(self.rootdir, self._unquote(path))
|
||||
with open(path, 'rb') as f:
|
||||
with lopen(path, 'rb') as f:
|
||||
return f.read()
|
||||
|
||||
def write(self, path, data):
|
||||
@ -530,7 +530,7 @@ class DirContainer(object):
|
||||
dir = os.path.dirname(path)
|
||||
if not os.path.isdir(dir):
|
||||
os.makedirs(dir)
|
||||
with open(path, 'wb') as f:
|
||||
with lopen(path, 'wb') as f:
|
||||
return f.write(data)
|
||||
|
||||
def exists(self, path):
|
||||
|
Loading…
x
Reference in New Issue
Block a user