+

Fix bug in debug mode

Benjamin Renard [2016-01-20 17:54:40]
Fix bug in debug mode
Filename
scripts/mailid_to_username
diff --git a/scripts/mailid_to_username b/scripts/mailid_to_username
index 9568b06..9d1caac 100755
--- a/scripts/mailid_to_username
+++ b/scripts/mailid_to_username
@@ -67,12 +67,7 @@ search_user_from_mailid "$MAILID"

 [ $DEBUG -eq 1 ] && echo "User not found. Try to detect original mail ID with message ID in log"

-if [ $DEBUG -eq 1 ]
-then
-	MSGID=$( mailid_to_messageid "$MAILID" -d )
-else
-	MSGID=$( mailid_to_messageid "$MAILID" )
-fi
+MSGID=$( mailid_to_messageid "$MAILID" )

 if [ -z "$MSGID" ]
 then
@@ -82,12 +77,7 @@ fi

 [ $DEBUG -eq 1 ] && echo "Message ID found : $MSGID. Try to detect original mail ID with this message ID"

-if [ $DEBUG -eq 1 ]
-then
-	ORIGMAILID=$( messageid_to_original_mailid "$MAILID" -d )
-else
-	ORIGMAILID=$( messageid_to_original_mailid "$MAILID" )
-fi
+ORIGMAILID=$( messageid_to_original_mailid "$MSGID" )

 if [ -z "$ORIGMAILID" ]
 then
ViewGit