diff options
author | nfnty <git@nfnty.se> | 2017-02-03 17:17:26 +0100 |
---|---|---|
committer | nfnty <git@nfnty.se> | 2017-02-03 17:17:26 +0100 |
commit | b7a7623934574f0f9c566d452c18b53f707dfdd8 (patch) | |
tree | 0657d488b2355a704f8aa44e1839783d9bb796ed /ranger | |
parent | 2564a3606619ea1a343e65bf92a1c9e5b34e5537 (diff) | |
download | ranger-b7a7623934574f0f9c566d452c18b53f707dfdd8.tar.gz |
Fix hidden filter for flat
Fixes #790
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/container/directory.py | 3 |
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)) |