From b7a7623934574f0f9c566d452c18b53f707dfdd8 Mon Sep 17 00:00:00 2001 From: nfnty Date: Fri, 3 Feb 2017 17:17:26 +0100 Subject: Fix hidden filter for flat Fixes #790 --- ranger/container/directory.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)) -- cgit 1.4.1-2-gfad0