On mounted partition, when I trash $somedir$
, it just works fine as the $somedir$ is moved to my OS's home trash directory. But, a directory named .Trash is automatically generated in the path I executed the command. If I tried to trash .Trash
, it fails like the below.
This result happened on Ubuntu 18.04.
➜ SHARE trash .Trash
Alias tip: th .Trash
Traceback (most recent call last):
File "/usr/bin/trash", line 5, in <module>
sys.exit(main())
File "/usr/lib/python2.7/dist-packages/trashcli/cmds.py", line 10, in put
).run(sys.argv)
File "/usr/lib/python2.7/dist-packages/trashcli/trash.py", line 548, in run
self.trash_all(args)
File "/usr/lib/python2.7/dist-packages/trashcli/trash.py", line 557, in trash_all
self.trash(arg)
File "/usr/lib/python2.7/dist-packages/trashcli/trash.py", line 560, in trash
self.trashcan.trash(arg)
File "/usr/lib/python2.7/dist-packages/trashcli/trash.py", line 324, in trash
trashed_file = trash_dir.trash(file)
File "/usr/lib/python2.7/dist-packages/trashcli/trash.py", line 80, in trash
move(path, trashed_file.actual_path)
File "/usr/lib/python2.7/dist-packages/trashcli/fs.py", line 47, in move
return shutil.move(path, str(dest))
File "/usr/lib/python2.7/shutil.py", line 312, in move
raise Error, "Cannot move a directory '%s' into itself '%s'." % (src, dst)
shutil.Error: Cannot move a directory '.Trash' into itself '/media/user/SHARE/.Trash/1000/files/.Trash'.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too