Do not try to rename a mailbox with the same name.
This commit is contained in:
tonio
2010-11-30 16:18:00 +01:00
parent f506cc7a97
commit d6cf51203b
+2
View File
@@ -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))