check if is null before checking for dir

This commit is contained in:
Dan OBoyle
2015-07-03 17:21:00 -04:00
parent 26eb8e48cc
commit 38b8ced5dd

View File

@@ -66,7 +66,7 @@ SECRING="${KEYRINGDIR}/secring.gpg"
# Is this a blackbox repo?
function is_blackbox_repo() {
if [[ -d "$1/keyrings" ]] && [[ -n "$1" ]]; then
if [[ -n "$1" ]] && [[ -d "$1/keyrings" ]]; then
return 0 # Yep, its a repo
else
return 1