From: Timo Sirainen Date: Thu, 4 Aug 2011 11:49:36 +0000 (+0300) Subject: fts: Added a bit more error checking to decode2text.sh X-Git-Tag: 2.1.alpha1~180 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57b19a7fa45e9cb76aa45eb211ff2bbfdcc5b514;p=thirdparty%2Fdovecot%2Fcore.git fts: Added a bit more error checking to decode2text.sh --- diff --git a/src/plugins/fts/decode2text.sh b/src/plugins/fts/decode2text.sh index c62c7b635f..77761f77b8 100755 --- a/src/plugins/fts/decode2text.sh +++ b/src/plugins/fts/decode2text.sh @@ -59,8 +59,11 @@ xmlunzip() { name=$1 tempdir=`mktemp -d` + if [ "$tempdir" = "" ]; then + exit 1 + fi trap "rm -rf $tempdir" 0 1 2 3 15 - cd $tempdir + cd $tempdir || exit 1 unzip -q "$path" find . -name "$name" -print0 | xargs -0 cat | /usr/local/libexec/dovecot/xml2text