Skip to content

Commit bc6ec88

Browse files
ayaGuillaumeSeren
authored andcommitted
Get notmuch database path using Database wrapper
It fixes afewmail#303 and closes afewmail#267, allowing FolderNameFilter to work with relative path in database.path of notmuch config file.
1 parent 295129d commit bc6ec88

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

afew/filters/FolderNameFilter.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# Copyright (c) dtk <[email protected]>
33

44
from afew.filters.BaseFilter import Filter
5-
from afew.NotmuchSettings import notmuch_settings
65
import re
76
import shlex
87

@@ -15,7 +14,7 @@ def __init__(self, database, folder_blacklist='', folder_transforms='',
1514
super().__init__(database)
1615

1716
self.__filename_pattern = '{mail_root}/(?P<maildirs>.*)/(cur|new)/[^/]+'.format(
18-
mail_root=notmuch_settings.get('database', 'path').rstrip('/'))
17+
mail_root=database.db_path.rstrip('/'))
1918
self.__folder_explicit_list = set(shlex.split(folder_explicit_list))
2019
self.__folder_blacklist = set(shlex.split(folder_blacklist))
2120
self.__folder_transforms = self.__parse_transforms(folder_transforms)

0 commit comments

Comments
 (0)