From 6726fd4051d5d7f12533a49549c66f3059a1ec20 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 22 Nov 2020 13:56:21 +0100 Subject: [PATCH] Ensure watcherd does not exit on path error --- watcherd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/watcherd b/watcherd index 03cbeac..f2350c1 100755 --- a/watcherd +++ b/watcherd @@ -100,10 +100,10 @@ function print_version() { function get_subdirs() { local path="${1}" # shellcheck disable=SC2016 - find "${path}" \ + (find "${path}" || true) \ | grep -Ev "^${path}\$" \ | grep -Ev "^${path}/.+/" \ - | xargs -n1 sh -c 'if [ -d "${1}" ]; then echo "${1}"; fi' -- \ + | xargs -n1 sh -c 'if [ -d "${1}" ]; then echo "${1}"; fi' -- \ | sort }