From f2795a0a34d01d077cef2a2b793d085b16fce76c Mon Sep 17 00:00:00 2001 From: Marius Tolzmann Date: Mon, 27 Aug 2012 13:57:49 +0200 Subject: [PATCH] bee-remove: Skip non-existent directories --- src/bee-remove.sh.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bee-remove.sh.in b/src/bee-remove.sh.in index d0396a3..1ee316f 100644 --- a/src/bee-remove.sh.in +++ b/src/bee-remove.sh.in @@ -80,6 +80,10 @@ function subdirs() { for path in "${@}" ; do last="" while [ "${path:0:1}" = '/' -a "${path}" != "" ] ; do + if [ ! -d "${path}" ] ; then + continue 2 + fi + this=$(stat "${path}" --printf "%F%m") if [ -n "${last}" -a "${last}" != "${this}" ] ; then continue 2