summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2014-02-15 13:13:38 +0100
committerhut <hut@lepus.uberspace.de>2014-02-15 13:13:38 +0100
commitf286cbdefb060e44bac6abd6c0ef4384593c9e23 (patch)
tree67e204e019a3604cee9171204ed03e569f23c57c /ranger
parent55a1a2c221667ceaa7fe1393814cc1546aee52bf (diff)
downloadranger-f286cbdefb060e44bac6abd6c0ef4384593c9e23.tar.gz
container.file: disable preview_max_size when value is 0
Diffstat (limited to 'ranger')
-rw-r--r--ranger/container/file.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ranger/container/file.py b/ranger/container/file.py
index 3205ce61..86e83a92 100644
--- a/ranger/container/file.py
+++ b/ranger/container/file.py
@@ -68,7 +68,8 @@ class File(FileSystemObject):
             return False
         if not self.accessible:
             return False
-        if self.size > self.fm.settings.preview_max_size:
+        if self.fm.settings.preview_max_size and \
+                self.size > self.fm.settings.preview_max_size:
             return False
         if self.fm.settings.preview_script and \
                 self.fm.settings.use_preview_script: