From: Elan Ruusamäe Date: Wed, 28 Feb 2007 08:34:46 +0000 (+0000) Subject: - bugfix for dead symlinks X-Git-Tag: AC-STABLE~1 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fbrowser-plugins.git;a=commitdiff_plain;h=e416f2563e963b8c57c90eb1a3ae8f0054c70682 - bugfix for dead symlinks Changed files: browser-plugins-update.sh -> 1.6 --- diff --git a/browser-plugins-update.sh b/browser-plugins-update.sh index 12801c2..6747036 100644 --- a/browser-plugins-update.sh +++ b/browser-plugins-update.sh @@ -66,6 +66,10 @@ blacklisted() { get_browsers() { for dir in "$browsersdir"/*.*; do if [ -L "$dir" ]; then + if [ ! -d "$dir" ]; then + echo >&2 "$0: WARNING: plugindir $dir is not pointing to directory, browser ignored" + continue + fi dir="${dir#$browsersdir/}" browsers="$browsers $dir" fi @@ -80,7 +84,7 @@ browserplugindir() { local browser="$1" local dir dir=$(readlink "$browsersdir/$browser") - if [ -z "$dir" ]; then + if [ ! -d "$dir" -o -z "$dir" ]; then echo >&2 "$0: ERROR: browser plugin dir pointing to nowhere for $browser!" exit 1 fi