summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/fsobject/directory.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/ranger/fsobject/directory.py b/ranger/fsobject/directory.py
index 2aa47a64..d21c856d 100644
--- a/ranger/fsobject/directory.py
+++ b/ranger/fsobject/directory.py
@@ -37,13 +37,8 @@ def sort_naturally_icase(path):
     return path.basename_natural_lower
 
 def accept_file(fname, dirname, hidden_filter, name_filter):
-    if hidden_filter:
-        try:
-            if hidden_filter.search(fname):
-                return False
-        except:
-            if hidden_filter in fname:
-                return False
+    if hidden_filter and hidden_filter.search(fname):
+        return False
     if name_filter and name_filter not in fname:
         return False
     return True