Make notmuch db location logic match upstream#1495
Make notmuch db location logic match upstream#1495kirelagin wants to merge 1 commit intopazz:masterfrom
Conversation
* Allow relative database.path in notmuch config. * Fallback to $MAILDIR or $HOME/mail.
|
Actually, I wish this code was in the bindings or in the C functions that bindings go through. |
|
I agree: this is something that the notmuch bindings should expose and we should not re-implement if it already exists as a (c) library function. I don't have time to look into this at the moment, but perhaps you could write to the notmuch list if this is not already in the bindings and ask why not, or propose a change to the bindings before you come back here to propose a PR that simply uses the bindings? I believe that'd be the cleanest solution. |
|
This problem is that this logic is implemented in |
|
I've been thinking about this again and it seems to be quite a big patch for a minimal change. indexpath = os.path.abspath(settings.get_notmuch_setting('database', 'path'))This will replace any relative path by its absolute path. |
Fixes #1396.
I am sorry, I have no idea how to write tests in Python, in particular, how to define helper constants in them. I suspect I should have put them not at the toplevel, but in the class, but I don’t know how to do that, please, help.