From 05b830042230e3ac553a74a04607cd083b88096d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20K=C5=99emel?= Date: Tue, 15 Nov 2022 12:43:20 +0100 Subject: [PATCH] parse pop config only when file exists --- bin/mailsync | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/mailsync b/bin/mailsync index a474695..1855ded 100755 --- a/bin/mailsync +++ b/bin/mailsync @@ -79,7 +79,7 @@ if [ "$#" -gt "0" ]; then fi # TODO handle account passed from argument [ -z "$accounts" ] && accounts="$(awk '/^Channel/ {print $2}' "$MBSYNCRC" 2>/dev/null)" -[ -z "$pop_accounts" ] && pop_accounts="$(awk '/^account/ {print $2}' "$MPOPRC" 2>/dev/null)" +[ -z "$pop_accounts" ] && [ -x $MPOPRC ] && pop_accounts="$(awk '/^account/ {print $2}' "$MPOPRC" 2>/dev/null)" # Parallelize multiple accounts for account in $accounts; do