]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
renaming mailbox under existing mailbox gave wrong error message
authorTimo Sirainen <tss@iki.fi>
Sun, 4 Jul 2004 20:11:04 +0000 (23:11 +0300)
committerTimo Sirainen <tss@iki.fi>
Sun, 4 Jul 2004 20:11:04 +0000 (23:11 +0300)
--HG--
branch : HEAD

src/lib-storage/index/mbox/mbox-storage.c

index 0b97a5f6458c3e9b4e673b2165cfbb334b804590..6a2543d0fa42f864679a8add3aad40bc059b0f47 100644 (file)
@@ -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;