diff options
author | hut <hut@lepus.uberspace.de> | 2014-08-26 22:43:28 +0200 |
---|---|---|
committer | hut <hut@lepus.uberspace.de> | 2014-08-26 22:58:57 +0200 |
commit | 207cafb045e8288b0f91df1528b9edb2a2c31971 (patch) | |
tree | eb43936b88311e98c796a023f2c6aaa5117598aa /ranger/container/directory.py | |
parent | dc4216a55e80361177675118944a69514618f6c9 (diff) | |
download | ranger-207cafb045e8288b0f91df1528b9edb2a2c31971.tar.gz |
container.directory: implemented random sorting
Diffstat (limited to 'ranger/container/directory.py')
-rw-r--r-- | ranger/container/directory.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ranger/container/directory.py b/ranger/container/directory.py index 07b2192d..de69c467 100644 --- a/ranger/container/directory.py +++ b/ranger/container/directory.py @@ -2,6 +2,7 @@ # This software is distributed under the terms of the GNU GPL version 3. import os.path +import random import re from os import stat as os_stat, lstat as os_lstat @@ -81,6 +82,7 @@ class Directory(FileSystemObject, Accumulator, Loadable): 'mtime': lambda path: -(path.stat and path.stat.st_mtime or 1), 'ctime': lambda path: -(path.stat and path.stat.st_ctime or 1), 'atime': lambda path: -(path.stat and path.stat.st_atime or 1), + 'random': lambda path: random.random(), 'type': lambda path: path.mimetype or '', } |