Mercurial > dovecot > original-hg > dovecot-1.2
changeset 136:899ea73710fc HEAD
"Mailbox doesn't exist" error now gives the name of the mailbox that was
tried to be accessed.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 03 Sep 2002 23:44:35 +0300 |
parents | 24c8fcb78e0e |
children | 5b631c4f95a1 |
files | src/imap/commands-util.c src/lib-storage/index/maildir/maildir-storage.c src/lib-storage/index/mbox/mbox-storage.c |
diffstat | 3 files changed, 13 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/imap/commands-util.c Tue Sep 03 23:35:31 2002 +0300 +++ b/src/imap/commands-util.c Tue Sep 03 23:44:35 2002 +0300 @@ -39,12 +39,14 @@ if (!should_exist) return TRUE; - client_send_tagline(client, "NO [TRYCREATE] " - "Mailbox doesn't exist."); + client_send_tagline(client, t_strconcat( + "NO [TRYCREATE] Mailbox doesn't exist: ", + mailbox, NULL)); break; case MAILBOX_NAME_INVALID: - client_send_tagline(client, "NO Invalid mailbox name."); + client_send_tagline(client, t_strconcat( + "NO Invalid mailbox name: ", mailbox, NULL)); break; case MAILBOX_NAME_EXISTS:
--- a/src/lib-storage/index/maildir/maildir-storage.c Tue Sep 03 23:35:31 2002 +0300 +++ b/src/lib-storage/index/maildir/maildir-storage.c Tue Sep 03 23:44:35 2002 +0300 @@ -164,7 +164,8 @@ return maildir_open(storage, name, readonly); } else if (errno == ENOENT) { - mail_storage_set_error(storage, "Mailbox doesn't exist"); + mail_storage_set_error(storage, "Mailbox doesn't exist: %s", + name); return NULL; } else { mail_storage_set_critical(storage, "Can't open mailbox %s: %m", @@ -224,7 +225,8 @@ i_snprintf(dest, sizeof(dest), "%s/..%s", storage->dir, name); if (stat(src, &st) != 0 && errno == ENOENT) { - mail_storage_set_error(storage, "Mailbox doesn't exist."); + mail_storage_set_error(storage, "Mailbox doesn't exist: %s", + name); return FALSE; }
--- a/src/lib-storage/index/mbox/mbox-storage.c Tue Sep 03 23:35:31 2002 +0300 +++ b/src/lib-storage/index/mbox/mbox-storage.c Tue Sep 03 23:44:35 2002 +0300 @@ -194,7 +194,8 @@ return mbox_open(storage, name, readonly); } else if (errno == ENOENT) { - mail_storage_set_error(storage, "Mailbox doesn't exist"); + mail_storage_set_error(storage, "Mailbox doesn't exist: %s", + name); return NULL; } else { mail_storage_set_critical(storage, "Can't open mailbox %s: %m", @@ -270,7 +271,8 @@ if (unlink(path) == -1) { if (errno == ENOENT) { mail_storage_set_error(storage, - "Mailbox doesn't exist."); + "Mailbox doesn't exist: %s", + name); } else { mail_storage_set_critical(storage, "Can't delete mbox " "file %s: %m", path);