From 305537963bb1db5b3e50213c46749f62bb84bc9a Mon Sep 17 00:00:00 2001 From: Wojciech Siewierski Date: Thu, 6 Apr 2017 00:49:00 +0200 Subject: 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. --- ranger/container/fsobject.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- cgit 1.4.1-2-gfad0