about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorWojciech Siewierski <wojciech.siewierski@onet.pl>2017-04-06 00:49:00 +0200
committerWojciech Siewierski <wojciech.siewierski@onet.pl>2017-04-06 00:57:20 +0200
commit305537963bb1db5b3e50213c46749f62bb84bc9a (patch)
tree8cd1013ee33a03760a7e27a0cd15c5ebc9460e9d
parentad58add9e0e6cb4675b231d967ff2204eabad4c3 (diff)
downloadranger-305537963bb1db5b3e50213c46749f62bb84bc9a.tar.gz
container.fsobject: Fix some issues with symlink stat handling
In the file loading code, if the loaded file was a symlink, the last
stored modification time of the real file (`self.stat`) was compared
with the modification time of the symlink (`real_ctime`). It was
leading to some subtle issues. The most visible result of this bug was
a flickering image preview of the symlinked images.

The bug was introduced in ec5dfcb1cb0f549fea3ecf7b0505f02e197887b2.
-rw-r--r--ranger/container/fsobject.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ranger/container/fsobject.py b/ranger/container/fsobject.py
index 22e380fc..d24a01ce 100644
--- a/ranger/container/fsobject.py
+++ b/ranger/container/fsobject.py
@@ -354,7 +354,7 @@ class FileSystemObject(  # pylint: disable=too-many-instance-attributes
             self.load()
             return True
         try:
-            real_ctime = lstat(self.path).st_ctime
+            real_ctime = stat(self.path).st_ctime
         except OSError:
             real_ctime = None
         if not self.stat or self.stat.st_ctime != real_ctime: