From e94d338de5d0a6b06f2b974f1be45e6b8e3675e5 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 19 Dec 2021 02:28:49 +0100 Subject: [PATCH] Proper handling for ignore_directories in file.monitor backend --- platypush/backend/file/monitor/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platypush/backend/file/monitor/__init__.py b/platypush/backend/file/monitor/__init__.py index 3a9e15527b..b2eb580246 100644 --- a/platypush/backend/file/monitor/__init__.py +++ b/platypush/backend/file/monitor/__init__.py @@ -33,10 +33,10 @@ class FileMonitorBackend(Backend): if isinstance(resource, str): resource = MonitoredResource(resource) elif isinstance(resource, dict): - if 'patterns' in resource or 'ignore_patterns' in resource: - resource = MonitoredPattern(**resource) - elif 'regexes' in resource or 'ignore_regexes' in resource: + if 'regexes' in resource or 'ignore_regexes' in resource: resource = MonitoredRegex(**resource) + elif 'patterns' in resource or 'ignore_patterns' in resource or 'ignore_directories' in resource: + resource = MonitoredPattern(**resource) else: resource = MonitoredResource(**resource)