mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-21 18:38:08 +01:00
python: support relative path in default database
From notmuch 0.28, notmuch support relative database path in notmuch-config(1), but python binding haven't taught this yet. afew denied to work with a perfectly fine notmuch-config due to this.
This commit is contained in:
parent
f599ea7877
commit
816633e636
1 changed files with 4 additions and 1 deletions
|
@ -675,7 +675,10 @@ class Database(object):
|
|||
if not config.has_option('database', 'path'):
|
||||
raise NotmuchError(message="No DB path specified"
|
||||
" and no user default found")
|
||||
return config.get('database', 'path')
|
||||
db_path = config.get('database', 'path')
|
||||
if not os.path.isabs(db_path):
|
||||
db_path = os.path.expanduser(os.path.join("~", db_path))
|
||||
return db_path
|
||||
|
||||
"""notmuch_database_get_config"""
|
||||
_get_config = nmlib.notmuch_database_get_config
|
||||
|
|
Loading…
Reference in a new issue