Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow mail not to be inside the notmuch db directory #214

Open
kirelagin opened this issue Apr 23, 2022 · 1 comment
Open

Allow mail not to be inside the notmuch db directory #214

kirelagin opened this issue Apr 23, 2022 · 1 comment

Comments

@kirelagin
Copy link

kirelagin commented Apr 23, 2022

My mail directory is completely separate from the notmuch database:

[database]
path=/home/kirelagin/.local/share/notmuch
mail_root=/mnt/data/mail/[email protected]

I cd to /mnt/data/mail/[email protected] and run gmi init [email protected], here is what I get:

initializing repository in: /mnt/data/mail/[email protected]..
Traceback (most recent call last):
  File "/nix/store/<...>-1.3/lib/python3.9/site-packages/lieer/local.py", line 280, in load_repository
    self.nm_dir  = db.get_directory (os.path.abspath(self.md))
  File "/nix/store/<...>-python3.9-notmuch-0.34.1/lib/python3.9/site-packages/notmuch/database.py", line 390, in get_directory
    raise FileError('Database().get_directory() called '
notmuch.errors.FileError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/nix/store/<...>-lieer-1.3/bin/.gmi-wrapped", line 25, in <module>
    g.main ()
  File "/nix/store/<...>-lieer-1.3/lib/python3.9/site-packages/lieer/gmailieer.py", line 212, in main
    args.func (args)
  File "/nix/store/<...>-1.3/lib/python3.9/site-packages/lieer/gmailieer.py", line 219, in initialize
    self.local.load_repository ()
  File "/nix/store/<...>-lieer-1.3/lib/python3.9/site-packages/lieer/local.py", line 290, in load_repository
    raise Local.RepositoryException ("local mail repository not in notmuch db")
lieer.local.RepositoryException: local mail repository not in notmuch db

I don’t really understand why this code is doing this, but this doesn’t seem right?

@gauteh
Copy link
Owner

gauteh commented May 4, 2022

Yeah, I think that should be possible. What path: search matches the directory? And how do we verify that it is a valid notmuch directory?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants