[Xfce4-commits] [apps/catfish] 01/01: Really fix path exclusions (Debian #926850)

noreply at xfce.org noreply at xfce.org
Sun Aug 25 17:51:55 CEST 2019


This is an automated email from the git hooks/post-receive script.

b   l   u   e   s   a   b   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/catfish.

commit c52c16fccfeea658d54e21ebf1c7634e30a42ab9
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Sun Aug 25 11:51:50 2019 -0400

    Really fix path exclusions (Debian #926850)
---
 ChangeLog                      | 2 ++
 catfish/CatfishSearchEngine.py | 4 +++-
 catfish_lib/CatfishSettings.py | 2 ++
 po/catfish.pot                 | 2 +-
 4 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 06ffcdc..b77d0d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,6 @@
 v1.4.10 (UNRELEASED):
+ + Bug Fixes:
+   - (Really) fix path exclusions (Debian #926850)
  + New Preferences Dialog:
    - Window layout (titlebar vs. headerbar)
    - Display options
diff --git a/catfish/CatfishSearchEngine.py b/catfish/CatfishSearchEngine.py
index e06e6c0..d53f12c 100644
--- a/catfish/CatfishSearchEngine.py
+++ b/catfish/CatfishSearchEngine.py
@@ -191,7 +191,7 @@ class CatfishSearchEngine:
                 if isinstance(filename, str) and path in filename:
                     found_bad = False
                     for filepath in exclude:
-                        if filepath in filename:
+                        if filename.startswith(filepath):
                             if self.stop_time > 0:
                                 logger.debug("Engine is stopped")
                                 return
@@ -307,6 +307,8 @@ class CatfishSearchMethod_Walk(CatfishSearchMethod):
         notdotlinks = []
         for path in dirs:
             path = os.path.join(root, path)
+            if not path.endswith("/"):
+                path = path + "/"
             if path in exclude_list:
                 continue
             if path in xdg_list:
diff --git a/catfish_lib/CatfishSettings.py b/catfish_lib/CatfishSettings.py
index 234b713..6b70eaa 100644
--- a/catfish_lib/CatfishSettings.py
+++ b/catfish_lib/CatfishSettings.py
@@ -72,6 +72,8 @@ class CatfishSettings:
                 for path in (self.settings[key].strip()).split(";"):
                     if len(path) > 0:
                         path = os.path.expanduser(path)
+                        if not path.endswith("/"):
+                            path = path + "/"
                         exclude_directories.append(path)
                 exclude_directories.sort()
                 return exclude_directories
diff --git a/po/catfish.pot b/po/catfish.pot
index d30e4dc..c59fef3 100644
--- a/po/catfish.pot
+++ b/po/catfish.pot
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-08-25 10:52-0400\n"
+"POT-Creation-Date: 2019-08-25 11:51-0400\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list