]> gitweb.fluxo.info Git - trashman.git/commitdiff
Fix: redirect errors on 'find' invocations
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 7 Jul 2022 16:59:22 +0000 (13:59 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 7 Jul 2022 16:59:22 +0000 (13:59 -0300)
share/trashman/trashman/functions

index abb2103fb8275587ccd719c96de2b7cefcc2ec2c..edc5e694afc65bd1fe3569443d2a80359d00d72b 100644 (file)
@@ -89,20 +89,20 @@ trashman_actions_folder() {
   fi
 
   if [ -e "$SHARE/$package/$ancestor/$family/$distro" ]; then
-    actions="`find $SHARE/$package/$ancestor/$family/$distro $findopts \; | xargs`"
+    actions="`find $SHARE/$package/$ancestor/$family/$distro $findopts \; 2> /dev/null | xargs`"
   else
     actions=""
   fi
 
   if [ -z "$actions" ]; then
     if [ -e "$SHARE/$package/$ancestor/$family" ]; then
-      actions="`find $SHARE/$package/$ancestor/$family $findopts \; | xargs`"
+      actions="`find $SHARE/$package/$ancestor/$family $findopts \; 2> /dev/null | xargs`"
     else
       actions=""
     fi
 
     if [ -z "$actions" ]; then
-      actions="`find $SHARE/$package/$ancestor $findopts \; | xargs`"
+      actions="`find $SHARE/$package/$ancestor $findopts \; 2> /dev/null | xargs`"
 
       if [ ! -z "$actions" ]; then
         echo $ancestor
@@ -127,7 +127,7 @@ trashman_actions() {
   local folder="`trashman_actions_folder $package`"
 
   if [ ! -z "$SHARE/$package/$folder" ]; then
-    find $SHARE/$package/$folder $findopts \; | xargs
+    find $SHARE/$package/$folder $findopts \; 2> /dev/null | xargs
   fi
 }