diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2005-03-06 14:29:25 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2005-03-06 14:29:25 +0000 |
commit | 9228442de1e8cfa7bb819d8d4a85b1c05975a200 (patch) | |
tree | d0ee4e977d2c42cc758f9ed5402a93d269cb9550 /sieve | |
parent | 6223b874ac531c041625acc49b9daff69607188e (diff) | |
download | mailutils-9228442de1e8cfa7bb819d8d4a85b1c05975a200.tar.gz mailutils-9228442de1e8cfa7bb819d8d4a85b1c05975a200.tar.bz2 |
Use a uniform way of filename quoting in diagnostic messages.
Diffstat (limited to 'sieve')
-rw-r--r-- | sieve/sieve.c | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/sieve/sieve.c b/sieve/sieve.c index 8c0e73923..75d3aa649 100644 --- a/sieve/sieve.c +++ b/sieve/sieve.c | |||
@@ -417,7 +417,7 @@ main (int argc, char *argv[]) | |||
417 | } | 417 | } |
418 | else if (!(opts.tickets_default && errno == ENOENT)) | 418 | else if (!(opts.tickets_default && errno == ENOENT)) |
419 | { | 419 | { |
420 | mu_error (_("wicket_create <%s> failed: %s"), | 420 | mu_error (_("wicket_create `%s' failed: %s"), |
421 | opts.tickets, mu_strerror (rc)); | 421 | opts.tickets, mu_strerror (rc)); |
422 | goto cleanup; | 422 | goto cleanup; |
423 | } | 423 | } |
@@ -452,8 +452,12 @@ main (int argc, char *argv[]) | |||
452 | /* Create, give a ticket to, and open the mailbox. */ | 452 | /* Create, give a ticket to, and open the mailbox. */ |
453 | if ((rc = mailbox_create_default (&mbox, opts.mbox)) != 0) | 453 | if ((rc = mailbox_create_default (&mbox, opts.mbox)) != 0) |
454 | { | 454 | { |
455 | mu_error (_("mailbox_create <%s> failed: %s"), | 455 | if (opts.mbox) |
456 | opts.mbox ? opts.mbox : _("default"), mu_strerror (rc)); | 456 | mu_error (_("Could not create mailbox `%s': %s"), |
457 | opts.mbox, mu_strerror (rc)); | ||
458 | else | ||
459 | mu_error (_("Could not create default mailbox: %s"), | ||
460 | mu_strerror (rc)); | ||
457 | goto cleanup; | 461 | goto cleanup; |
458 | } | 462 | } |
459 | 463 | ||
@@ -499,8 +503,12 @@ main (int argc, char *argv[]) | |||
499 | 503 | ||
500 | if (rc != 0) | 504 | if (rc != 0) |
501 | { | 505 | { |
502 | mu_error (_("Opening mailbox `%s' failed: %s"), | 506 | if (opts.mbox) |
503 | opts.mbox ? opts.mbox : _("default"), mu_strerror (rc)); | 507 | mu_error (_("Opening mailbox `%s' failed: %s"), |
508 | opts.mbox, mu_strerror (rc)); | ||
509 | else | ||
510 | mu_error (_("Opening default mailbox failed: %s"), | ||
511 | mu_strerror (rc)); | ||
504 | mailbox_destroy (&mbox); | 512 | mailbox_destroy (&mbox); |
505 | goto cleanup; | 513 | goto cleanup; |
506 | } | 514 | } |
@@ -518,9 +526,15 @@ cleanup: | |||
518 | any messages that were marked DELETED even if execution failed | 526 | any messages that were marked DELETED even if execution failed |
519 | on a later message. */ | 527 | on a later message. */ |
520 | if ((e = mailbox_expunge (mbox)) != 0) | 528 | if ((e = mailbox_expunge (mbox)) != 0) |
521 | mu_error (_("Expunge on mailbox `%s' failed: %s"), | 529 | { |
522 | opts.mbox ? opts.mbox : _("default"), mu_strerror (e)); | 530 | if (opts.mbox) |
523 | 531 | mu_error (_("Expunge on mailbox `%s' failed: %s"), | |
532 | opts.mbox, mu_strerror (e)); | ||
533 | else | ||
534 | mu_error (_("Expunge on default mailbox failed: %s"), | ||
535 | mu_strerror (e)); | ||
536 | } | ||
537 | |||
524 | if (e && !rc) | 538 | if (e && !rc) |
525 | rc = e; | 539 | rc = e; |
526 | } | 540 | } |