This commit is contained in:
Kovid Goyal 2019-04-18 22:18:58 +05:30
commit 6c02a2c2a7
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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):