mirror of
https://github.com/void-linux/void-packages.git
synced 2025-10-09 03:55:20 +02:00
30 lines
1.2 KiB
Diff
30 lines
1.2 KiB
Diff
commit 5a67af37109c71f99de508a2d1fd074ff948d224
|
|
Author: Yann Autissier <yann.autissier@gmail.com>
|
|
Date: Mon Dec 6 19:29:57 2021 +0100
|
|
|
|
Get notmuch database path using Database wrapper
|
|
|
|
It fixes #303 and closes #267, allowing FolderNameFilter to work with
|
|
relative path in database.path of notmuch config file.
|
|
|
|
diff --git a/afew/filters/FolderNameFilter.py b/afew/filters/FolderNameFilter.py
|
|
index effe949..af8ed78 100644
|
|
--- a/afew/filters/FolderNameFilter.py
|
|
+++ b/afew/filters/FolderNameFilter.py
|
|
@@ -2,7 +2,6 @@
|
|
# Copyright (c) dtk <dtk@gmx.de>
|
|
|
|
from afew.filters.BaseFilter import Filter
|
|
-from afew.NotmuchSettings import notmuch_settings
|
|
import re
|
|
import shlex
|
|
|
|
@@ -15,7 +14,7 @@ class FolderNameFilter(Filter):
|
|
super().__init__(database)
|
|
|
|
self.__filename_pattern = '{mail_root}/(?P<maildirs>.*)/(cur|new)/[^/]+'.format(
|
|
- mail_root=notmuch_settings.get('database', 'path').rstrip('/'))
|
|
+ mail_root=database.db_path.rstrip('/'))
|
|
self.__folder_explicit_list = set(shlex.split(folder_explicit_list))
|
|
self.__folder_blacklist = set(shlex.split(folder_blacklist))
|
|
self.__folder_transforms = self.__parse_transforms(folder_transforms)
|