Merge pull request #90 from yogeshiitm/master

Fix bug when source and destination directories are on different file systems
This commit is contained in:
Andrew Senetar 2024-03-28 01:17:37 -05:00 committed by GitHub
commit 78fa300cac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ def trash_move(src, dst, topdir=None, cross_dev=False):
f.write(info_for(src, topdir))
destpath = op.join(filespath, destname)
if cross_dev:
shutil.move(src, destpath)
shutil.move(fsdecode(src), fsdecode(destpath))
else:
os.rename(src, destpath)