andreafrancia/trash-cli — Issue #1: Not sure if issue
Author: kazza789
Created: 2011-11-23 23:21:16+00:00
State: open

I've been using trashcli for some time. I just ran the following

trash .*

which came up with the error message:

trash: cannot trash `.': [Errno 22] Invalid argument: '.'

and then hit Ctrl+C a second later as I wasn't sure what the effect would be. The files that were in the directory have been deleted, but they were not moved to trash. I'm not sure if this is a bug or not, but thought you might be interested. Had the following readout :

trash: cannot trash `.': [Errno 22] Invalid argument: '.'
^CTraceback (most recent call last):
File "/usr/bin/trash", line 143, in
trash(f)
File "/usr/bin/trash", line 46, in trash
trashed_file = TrashDirectory.getHomeTrashDirectory().trash(f)
File "/usr/lib/pymodules/python2.6/libtrash/__init__.py", line 194, in trash
fileToBeTrashed.move(self.getOriginalCopyPath(trash_id))
File "/usr/lib/pymodules/python2.6/libtrash/__init__.py", line 67, in move
return shutil.move(self.path, str(dest))
File "/usr/lib/python2.6/shutil.py", line 257, in move
copytree(src, real_dst, symlinks=True)
File "/usr/lib/python2.6/shutil.py", line 154, in copytree
copytree(srcname, dstname, symlinks, ignore)
File "/usr/lib/python2.6/shutil.py", line 154, in copytree
copytree(srcname, dstname, symlinks, ignore)
File "/usr/lib/python2.6/shutil.py", line 154, in copytree
copytree(srcname, dstname, symlinks, ignore)
File "/usr/lib/python2.6/shutil.py", line 154, in copytree
copytree(srcname, dstname, symlinks, ignore)
File "/usr/lib/python2.6/shutil.py", line 154, in copytree
copytree(srcname, dstname, symlinks, ignore)
File "/usr/lib/python2.6/shutil.py", line 156, in copytree
copy2(srcname, dstname)
File "/usr/lib/python2.6/shutil.py", line 95, in copy2
copyfile(src, dst)
File "/usr/lib/python2.6/shutil.py", line 52, in copyfile
copyfileobj(fsrc, fdst)
File "/usr/lib/python2.6/shutil.py", line 28, in copyfileobj
buf = fsrc.read(length)
KeyboardInterrupt

Ubuntu 10.10, Bash 4.1.5(1)