arnavmehta1977@gmail.com 5 anos atrás
pai
commit
79e64b0e24
1 arquivos alterados com 4 adições e 1 exclusões
  1. 4 1
      tmpmail

+ 4 - 1
tmpmail

@@ -258,7 +258,10 @@ download_attachment () {
     EMAIL_ID="$1"
     FILE="$2"
     DATA=$(curl -sL "${TMPMAIL_API_URL}?action=download&login=$USERNAME&domain=$DOMAIN&id=$EMAIL_ID&file=$FILE")
-    [ "$DATA" == "" ] && print_error "Attachment or email id does not exist."
+    if [ "$DATA" == "" ]
+    then
+        print_error "Attachment or email id does not exist."
+    fi
     printf %s "$DATA" > "$FILE"
 }