summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorChristian Zangl <laktak@cdak.net>2018-02-05 22:25:02 +0100
committerChristian Zangl <laktak@cdak.net>2018-02-07 22:57:08 +0100
commitc921a418d1241170b78c3a4bdc4fd6a5083432fd (patch)
treeb61bf94629d6002af45943318d16af6942446ca5
parentced74b92d12dfa2abb06cccae3af7df0ab05cc81 (diff)
downloadranger-c921a418d1241170b78c3a4bdc4fd6a5083432fd.tar.gz
fix automatically_count_files false
-rw-r--r--ranger/ext/human_readable.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/ranger/ext/human_readable.py b/ranger/ext/human_readable.py
index df74eabf..f365e594 100644
--- a/ranger/ext/human_readable.py
+++ b/ranger/ext/human_readable.py
@@ -15,6 +15,10 @@ def human_readable(byte, separator=' '):  # pylint: disable=too-many-return-stat
     '1023 M'
     """
 
+    # handle automatically_count_files false
+    if byte is None:
+        return ''
+
     # I know this can be written much shorter, but this long version
     # performs much better than what I had before.  If you attempt to
     # shorten this code, take performance into consideration.
9'>bc643692 ^
6a0f71b9 ^
bc643692 ^
12d73ee8 ^
6a0f71b9 ^
0012c703 ^
6a0f71b9 ^
0012c703 ^
6a0f71b9 ^
0012c703 ^
6a0f71b9 ^
0012c703 ^
6a0f71b9 ^
290fe117 ^
54d48b25 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25