summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/container/directory.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ranger/container/directory.py b/ranger/container/directory.py
index 136cc8ac..07b2192d 100644
--- a/ranger/container/directory.py
+++ b/ranger/container/directory.py
@@ -77,7 +77,7 @@ class Directory(FileSystemObject, Accumulator, Loadable):
     sort_dict = {
         'basename': sort_by_basename,
         'natural': sort_naturally,
-        'size': lambda path: -path.size,
+        'size': lambda path: -(path.size or 1),
         '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),
36'>36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
101
102
103
104
105
106
107
108