andreafrancia / trash-cli

Command line interface to the freedesktop.org trashcan.
GNU General Public License v2.0
3.53k stars 177 forks source link

trash-put: cannot trash directory <directory> #310

Closed minorikawafuso closed 8 months ago

minorikawafuso commented 11 months ago

Describe the bug i was creating LFS system logged in user "LFS" i wanted to remove the whole directory "util-linux-2.34" and it's inner files im very sure the directory "util-linux-2.34" is exists

lfs@IBM5200:/mnt/lfs/sources$ alias rm='trash-put' lfs@IBM5200:/mnt/lfs/sources$ rm util-linux-2.34 trash-put: cannot trash directory 'util-linux-2.34'

the rm -rf command is working but trash-put

trash-cli version trash-put 0.17.1.14

Are you using the latest version of trash-cli? Yes

Have you tried if the bug is present in the latest version of trash-cli? i dont know

Please, install the latest version of trash-cli and try again before submitting the bug i installed by apt

Have done that? Then continue with the bug report.

Operating system:

To Reproduce Copy and paste the commands (and their output) to execute in order to reproduce the behavior:

lfs@IBM5200:/mnt/lfs/sources$ touch foo lfs@IBM5200:/mnt/lfs/sources$ trash-put foo trash-put: cannot trash regular empty file 'foo' lfs@IBM5200:/mnt/lfs/sources$ ls foo foo lfs@IBM5200:/mnt/lfs/sources$ trash-list

Expected behavior i want to move the directory to trash can

andreafrancia commented 8 months ago

The version 0.17.1.14 is from 6 years ago and it is not secure to use. It can be that apt from the distro you are currently using does not have a current version of trash-cli (this a common issue when trash-cli is installed by the distro package manager).

Please remove trash-cli using apt-get remove trash-cli and reinstall it using pip, for example pip install trash-cli. The current version of trash-cli is >= 0.23

If the problem persist please comment below indicating which version of trash-cli are you using.

andreafrancia commented 8 months ago

Closing because no feedback.