fix trash_rm
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Kim Oliver Drechsel 2021-09-21 19:36:27 +02:00
parent 10d4f8d2ad
commit 8492f4ea64

View File

@ -38,7 +38,7 @@ trash_restore() {
trash_rm() {
for FILE_TO_REMOVE in "$@"; do
if [[ ! "$FILE_TO_REMOVE" =~ $HOME/.trash ]]
if ! echo "$FILE_TO_REMOVE" | grep "$HOME/.trash"
then FILE_TO_REMOVE="$HOME/.trash/$FILE_TO_REMOVE"
fi
if [ -f "$FILE_TO_REMOVE" ]; then