diff --git a/plexupdate.sh b/plexupdate.sh index ab0a6a3..47e7c73 100755 --- a/plexupdate.sh +++ b/plexupdate.sh @@ -342,7 +342,7 @@ if [ "${AUTOUPDATE}" = "yes" ]; then exit 1 fi - if [ $FILE_OWNER ]; then + if [ ${#FILE_OWNER[@]} -gt 0 ]; then for filename in $PLEXUPDATE_FILES; do chown ${FILE_OWNER[$filename]} $filename &> /dev/null || error "Failed to restore ownership for '$filename' after auto-update" chmod ${FILE_PERMS[$filename]} $filename &> /dev/null || error "Failed to restore permissions for '$filename' after auto-update"