From 7c06aaacb0f24c67f2591d52c186d5e2b8e6c9f0 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Wed, 24 Apr 2019 08:48:08 -0400 Subject: [PATCH] bad passwords cause error --- bin/mw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/mw b/bin/mw index e5fb9b0..34d6407 100755 --- a/bin/mw +++ b/bin/mw @@ -175,7 +175,7 @@ formatShortcut() { \ done ;} tryconnect() { mkdir -p "$maildir/$title" - if mailboxes="$(mbsync -l "$title" | sed 's/\//./')" >/dev/null 2>&1; then + if mailboxes="$(mbsync -l "$title" | sed 's/\//./')" >/dev/null 2>&1 && [ -n "$mailboxes" ]; then [ "$accounttype" = "online" ] && sed -i "/IMAPStore $title-remote$/,/# End profile/d" "$mbsyncrc" printf "\033[32mMailboxes detected.\033[0m\\n" echo "$mailboxes" | xargs -I {} mkdir -p "$maildir/$title/{}"