diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2002-08-26 17:06:16 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2002-08-26 17:06:16 +0000 |
commit | da88ef5409ea73f0de3d4bf66b766f2ee297d8c1 (patch) | |
tree | 482ec16ae43f5bb2eb1579f5d21d194e6274e28a /frm | |
parent | 711525622db0ea02a0702855c00dddc1968f4d13 (diff) | |
download | mailutils-da88ef5409ea73f0de3d4bf66b766f2ee297d8c1.tar.gz mailutils-da88ef5409ea73f0de3d4bf66b766f2ee297d8c1.tar.bz2 |
Don't bail out if the mailbox does not exist.
Diffstat (limited to 'frm')
-rw-r--r-- | frm/frm.c | 21 |
1 files changed, 16 insertions, 5 deletions
@@ -38,6 +38,7 @@ #include <mailutils/observer.h> #include <mailutils/registrar.h> #include <mailutils/stream.h> +#include <mailutils/url.h> static char* show_field; static int show_to; @@ -348,9 +349,16 @@ main(int argc, char **argv) if (status != 0) { - fprintf (stderr, "could not open mailbox <%s>: %s\n", - mailbox_name ? mailbox_name : "default", - mu_errstring(status)); + url_t url = NULL; + + mailbox_get_url (mbox, &url); + if (status == ENOENT) + status = 2; + else + fprintf (stderr, "could not open mailbox %s: %s\n", + url_to_string (url), + mu_errstring(status)); + goto cleanup; } @@ -366,9 +374,12 @@ main(int argc, char **argv) if (status != 0) { + url_t url = NULL; + + mailbox_get_url (mbox, &url); fprintf (stderr, "could not scan mailbox <%s>: %s\n", - mailbox_name ? mailbox_name : "default", - mu_errstring(status)); + url_to_string (url), + mu_errstring(status)); goto cleanup; } |