mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 04:43:44 +02:00
...
This commit is contained in:
parent
ce9d5f4104
commit
eb1adb69de
1 changed files with 2 additions and 2 deletions
|
|
@ -522,7 +522,7 @@ def read(self, path):
|
|||
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 @@ def write(self, path, data):
|
|||
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…
Reference in a new issue