summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authornfnty <git@nfnty.se>2017-02-03 17:17:26 +0100
committernfnty <git@nfnty.se>2017-02-03 17:17:26 +0100
commitb7a7623934574f0f9c566d452c18b53f707dfdd8 (patch)
tree0657d488b2355a704f8aa44e1839783d9bb796ed /ranger
parent2564a3606619ea1a343e65bf92a1c9e5b34e5537 (diff)
downloadranger-b7a7623934574f0f9c566d452c18b53f707dfdd8.tar.gz
Fix hidden filter for flat
Fixes #790
Diffstat (limited to 'ranger')
-rw-r--r--ranger/container/directory.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ranger/container/directory.py b/ranger/container/directory.py
index b23abe04..c6dba2ef 100644
--- a/ranger/container/directory.py
+++ b/ranger/container/directory.py
@@ -233,7 +233,8 @@ class Directory(  # pylint: disable=too-many-instance-attributes,too-many-public
         if not self.settings.show_hidden and self.settings.hidden_filter:
             hidden_filter = re.compile(self.settings.hidden_filter)
             hidden_filter_search = hidden_filter.search
-            filters.append(lambda fobj: not hidden_filter_search(fobj.basename))
+            filters.append(
+                lambda fobj: not hidden_filter_search(fobj.relative_path.split(os.path.sep)[0]))
         if self.filter:
             filter_search = self.filter.search
             filters.append(lambda fobj: filter_search(fobj.basename))