From d6cf51203b51ccaabff2f3fa03f736f89c909a69 Mon Sep 17 00:00:00 2001 From: tonio Date: Tue, 30 Nov 2010 16:18:00 +0100 Subject: [PATCH] fixed #101 Do not try to rename a mailbox with the same name. --- admin/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/admin/models.py b/admin/models.py index d3a546b97..c57dcaddf 100644 --- a/admin/models.py +++ b/admin/models.py @@ -87,6 +87,8 @@ class Mailbox(models.Model): return True def rename_dir(self, domain, newaddress): + if self.domain.name == domain and newaddress == self.address: + return True path = "%s/%s" % (parameters.get_admin("STORAGE_PATH"), domain) code = exec_as_vuser("mv %s/%s %s/%s" \ % (path, self.address, path, newaddress))