diff --git a/config/path b/config/path index 52c5fe8eb3..eb94381d6b 100644 --- a/config/path +++ b/config/path @@ -54,7 +54,13 @@ SED="sed -i" PKG_LONGDESC="" PKG_IS_ADDON="no" - [ -n "$1" ] && PKG_DIR=`find $PACKAGES -type d -name $1 2>/dev/null` + if [ -n "$1" ]; then + PKG_DIR=`find $PACKAGES -type d -name $1 2>/dev/null` + if [[ $PKG_DIR = *$'\n'* ]]; then + echo -e "Error - multiple package folders:\n$PKG_DIR" + exit 1 + fi + fi [ -r $PKG_DIR/meta ] && . $PKG_DIR/meta [ "$PKG_IS_ADDON" = "yes" ] && PKG_ADDON_ID="`echo $PKG_SECTION | sed 's,/,.,g'`.$PKG_NAME"