Skip to content

Commit

Permalink
Make sure find function only specifies single directories
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Clark <ben@benjyc.uk>
  • Loading branch information
BClark09 committed Aug 6, 2017
1 parent 6b1687a commit cff613a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion distributions/openhab/src/main/resources/bin/restore
Expand Up @@ -134,7 +134,7 @@ echo "Deleting current configuration"
if [ ! -d "./jsondb" ] || [ ! -d "./etc" ]; then
echo "Couldn't find anything sensible in $OPENHAB_USERDATA skipping..."
else
find . ! -name 'etc' ! -name '.' ! -name 'backups' -type d -exec rm -rf {} +
find . -maxdepth 1 ! -name 'etc' ! -name '.' ! -name 'backups' -type d -exec rm -rf {} +
fi
) || {
echo "Failed to delete current userdata contents." >&2
Expand Down

0 comments on commit cff613a

Please sign in to comment.