diff --git a/lieer/local.py b/lieer/local.py index a9e5f79..dd29ee1 100644 --- a/lieer/local.py +++ b/lieer/local.py @@ -367,8 +367,9 @@ def load_repository(self, block=False): ## Check if we are in the notmuch db with notmuch2.Database() as db: + mail_root = db.config.get("database.mail_root", db.path) try: - self.nm_relative = str(Path(self.md).relative_to(db.path)) + self.nm_relative = str(Path(self.md).relative_to(mail_root)) except ValueError: raise Local.RepositoryException( "local mail repository not in notmuch db"