From 5df0e4c07b2a51b5f4035fc7fe35b5508073410b Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sun, 4 Jul 2004 23:11:04 +0300 Subject: [PATCH] renaming mailbox under existing mailbox gave wrong error message --HG-- branch : HEAD --- src/lib-storage/index/mbox/mbox-storage.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib-storage/index/mbox/mbox-storage.c b/src/lib-storage/index/mbox/mbox-storage.c index 0b97a5f645..6a2543d0fa 100644 --- a/src/lib-storage/index/mbox/mbox-storage.c +++ b/src/lib-storage/index/mbox/mbox-storage.c @@ -727,7 +727,11 @@ static int mbox_mailbox_rename(struct mail_storage *_storage, mail_storage_set_error(_storage, "Target mailbox already exists"); return -1; - } else if (!ENOTFOUND(errno) && errno != EACCES) { + } else if (errno == ENOTDIR) { + mail_storage_set_error(_storage, + "Target mailbox doesn't allow inferior mailboxes"); + return -1; + } else if (errno != ENOENT && errno != EACCES) { mail_storage_set_critical(_storage, "lstat(%s) failed: %m", newpath); return -1; -- 2.47.3