Fixed restore mode

This commit is contained in:
Antoine Nguyen
2022-11-09 10:30:44 +01:00
parent d6f9a5b913
commit 37633008cb
12 changed files with 103 additions and 63 deletions

View File

@@ -153,7 +153,7 @@ class Dovecot(base.Installer):
def restore(self):
"""Restore emails."""
home_dir = self.config.get("dovecot", "home_dir")
mail_dir = os.path.join(self.restore, "mails/")
mail_dir = os.path.join(self.archive_path, "mails/")
if len(os.listdir(mail_dir)) > 0:
utils.success("Copying mail backup over dovecot directory.")
if os.path.exists(home_dir):