Merge pull request #745 from 4nd3r/__clean_path_fix

__clean_path: do not exit with non-zero if path does not exist or not directory
This commit is contained in:
Darko Poljak 2019-04-02 18:38:48 +02:00 committed by GitHub
commit cfe2afc225
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,11 +20,7 @@
path="/$__object_id"
if [ ! -d "$path" ]
then
echo "$path is not a directory" >&2
exit 1
fi
[ ! -d "$path" ] && exit 0
pattern="$( cat "$__object/parameter/pattern" )"