mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge branch 'py3' of https://github.com/eli-schwartz/calibre
This commit is contained in:
commit
6c02a2c2a7
@ -92,7 +92,10 @@ def trash_move(src, dst, topdir=None):
|
|||||||
|
|
||||||
os.rename(src, op.join(filespath, destname))
|
os.rename(src, op.join(filespath, destname))
|
||||||
with open(op.join(infopath, destname + INFO_SUFFIX), 'wb') as f:
|
with open(op.join(infopath, destname + INFO_SUFFIX), 'wb') as f:
|
||||||
f.write(info_for(src, topdir))
|
data = info_for(src, topdir)
|
||||||
|
if not isinstance(data, bytes):
|
||||||
|
data = data.encode('utf-8')
|
||||||
|
f.write(data)
|
||||||
|
|
||||||
|
|
||||||
def find_mount_point(path):
|
def find_mount_point(path):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user