From e0c62ec15db8b47d90597ef4ed894c468d923a26 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Johannes=20Wei=C3=9Fl?= Date: Tue, 27 Apr 2010 00:17:05 +0200 Subject: [PATCH 1/1] fix: case insensitive Message-ID grepping, maildir check --- muttjump | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/muttjump b/muttjump index aa9e8b8..8376fa0 100755 --- a/muttjump +++ b/muttjump @@ -50,7 +50,7 @@ if ! type -p $MUTT >/dev/null ; then fi # search for Message-ID in STDIN -msgid=$(sed -n 's/^Message-ID: \(.*\)/\1/p' | head -n1) +msgid=$(sed -n 's/^Message-ID: \(.*\)/\1/Ip' | head -n1) if [ -z "$msgid" ] ; then die "could not find Message-ID header in standard input" fi @@ -87,7 +87,11 @@ if [ -z "$orig_msgfile" -o ! -e "$orig_msgfile" ] ; then die "no message with msgid $msgid found!" fi +# get containing maildir of $orig_msgfile orig_maildir=$(dirname $(dirname "$orig_msgfile")) +if [ ! -d "$orig_maildir/cur" ] ; then + die "directory \"$orig_maildir\" doesn't exist or is no Maildir" +fi # Close message-stdin and open terminal-stdin instead. # mutt behaves different if STDIN is no terminal -- 2.30.2