about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2020-02-12 11:35:26 +0100
committertoonn <toonn@toonn.io>2020-02-12 11:38:49 +0100
commite2619d96f23b28a100266e8b9fe4fee7df59ed01 (patch)
tree1d57bee8763b5c5233a441e9ba02927349512dcf
parent870435dd9bec311d0866eb4a801ff174366ed0a9 (diff)
downloadranger-e2619d96f23b28a100266e8b9fe4fee7df59ed01.tar.gz
Allow equal mtime for cached previews
This allows the use of symlinks to prevent copying files to the cache.

Fixes #1837
-rw-r--r--ranger/core/actions.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index c3d7de86..9b64f63a 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -1124,7 +1124,7 @@ class Actions(  # pylint: disable=too-many-instance-attributes,too-many-public-m
         cacheimg = os.path.join(ranger.args.cachedir, self.sha1_encode(path))
         if self.settings.preview_images and \
                 os.path.isfile(cacheimg) and \
-                os.path.getmtime(cacheimg) > os.path.getmtime(path):
+                os.path.getmtime(cacheimg) >= os.path.getmtime(path):
             data['foundpreview'] = True
             data['imagepreview'] = True
             pager.set_image(cacheimg)