1
0
mirror of https://github.com/arsenetar/send2trash.git synced 2026-03-29 16:41:39 +00:00

fix trash_move

this bug prevents using jupyter* in research environments where file systems aren't always local

e.g. https://github.com/jupyterlab/jupyterlab/issues/5781 and our own use at https://cri.uchicago.edu/

cc @annawoodard
This commit is contained in:
Maksim Levental
2021-08-19 17:13:11 -05:00
committed by GitHub
parent 1d1b8755a9
commit b6cb3653f8

View File

@@ -112,7 +112,8 @@ def trash_move(src, dst, topdir=None):
with open(op.join(infopath, destname + INFO_SUFFIX), "w") as f: with open(op.join(infopath, destname + INFO_SUFFIX), "w") as f:
f.write(info_for(src, topdir)) f.write(info_for(src, topdir))
os.rename(src, op.join(filespath, destname)) shutil.copy(src, op.join(filespath, destname))
os.remove(src)
def find_mount_point(path): def find_mount_point(path):