mirror of
https://github.com/void-linux/void-packages.git
synced 2025-08-02 02:42:56 +02:00
afew: backport upstream database.path fix
This commit is contained in:
parent
6c3db61b7a
commit
d174767185
1 changed files with 30 additions and 0 deletions
30
srcpkgs/afew/patches/database-path.patch
Normal file
30
srcpkgs/afew/patches/database-path.patch
Normal file
|
@ -0,0 +1,30 @@
|
|||
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)
|
Loading…
Add table
Reference in a new issue