]> gitweb.fluxo.info Git - keyringer.git/commitdiff
Use -depht after path on find for GNU and BSD compatibility
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 30 May 2018 17:41:50 +0000 (14:41 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 30 May 2018 17:41:50 +0000 (14:41 -0300)
lib/keyringer/functions

index 72286ff7eeaca01f4bc7df8668ed3510089444f3..d529daf6e245cb06aeb87accf856563360ce811e 100755 (executable)
@@ -218,7 +218,7 @@ function keyringer_shred {
       $tool -rf $path
     else
       find $path -type f -exec $tool -uf {} \;
-      find -d $path -type d -exec rmdir {} \;
+      find $path -depth -type d -exec rmdir {} \;
     fi
   else
     if [ "$tool" == "wipe" ] || [ "$tool" == "rm" ] || [ "$tool" == "rm -P" ]; then