Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.Trash directory #22

Open
jjangga0214 opened this issue Dec 27, 2018 · 0 comments
Open

.Trash directory #22

jjangga0214 opened this issue Dec 27, 2018 · 0 comments

Comments

@jjangga0214
Copy link

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'.
@jjangga0214 jjangga0214 changed the title .Trash directory .Trash directory Dec 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant