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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -112,7 +112,8 @@ def trash_move(src, dst, topdir=None):
with open(op.join(infopath, destname + INFO_SUFFIX), "w") as f:
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):