diff options
author | hut <hut@lavabit.com> | 2013-02-15 18:22:22 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2013-02-15 18:32:43 +0100 |
commit | 9b065d0ac7ea3a26f73146b33e087e1ad35980f3 (patch) | |
tree | 2ba29fbd1a5c9dbb4fd032a36ea070c5507eaa86 /ranger | |
parent | 325cac10f7c3af8e7c8fd22469f4354e72a2df90 (diff) | |
download | ranger-9b065d0ac7ea3a26f73146b33e087e1ad35980f3.tar.gz |
fsobject.directory.accept_file: pass directory, not dirname
That way, the accept_file function can get whatever information about the directory it needs.
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/fsobject/directory.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ranger/fsobject/directory.py b/ranger/fsobject/directory.py index d21c856d..a71b00a9 100644 --- a/ranger/fsobject/directory.py +++ b/ranger/fsobject/directory.py @@ -36,7 +36,7 @@ def sort_naturally(path): def sort_naturally_icase(path): return path.basename_natural_lower -def accept_file(fname, dirname, hidden_filter, name_filter): +def accept_file(fname, directory, hidden_filter, name_filter): if hidden_filter and hidden_filter.search(fname): return False if name_filter and name_filter not in fname: @@ -210,7 +210,7 @@ class Directory(FileSystemObject, Accumulator, Loadable, SettingsAware): filenames = [mypath + (mypath == '/' and fname or '/' + fname)\ for fname in filelist if accept_file( - fname, mypath, hidden_filter, self.filter)] + fname, self, hidden_filter, self.filter)] yield self.load_content_mtime = os.stat(mypath).st_mtime |