From fdb5224dc3272ffefb8d57dd07388740752515db Mon Sep 17 00:00:00 2001 From: hut Date: Wed, 6 Feb 2013 18:33:31 +0100 Subject: fsobject.fsobject: Fix incorrect symlink formatting (#38271) Thanks to looper for reporting. Bug report was: Symlink looses formatting Details: Steps to reproduce: 1. Make an empty directory end enter it. 2. Do :touch . 3. Open other tab with any path and copy any file with 'yy'. 4. Swap to previous tab and paste the symlink with 'pl'. 5. The symlink coloured and looks like common file, not like a symlink. 6. Move cursor to the symlink and back to from point 2. Now the symlink looks as intended. 7. While cursos stays on , reload cwd with 'R'. The symlink looks like common file again. ---- ranger-master 1.5.5 Python 2.7.3 (default, Jan 2 2013, 16:53:07) [GCC 4.7.2] --- ranger/fsobject/fsobject.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ranger/fsobject/fsobject.py b/ranger/fsobject/fsobject.py index 0417e8d3..d2207ab6 100644 --- a/ranger/fsobject/fsobject.py +++ b/ranger/fsobject/fsobject.py @@ -202,8 +202,8 @@ class FileSystemObject(FileManagerAware): is_link = False if self.preload: new_stat = self.preload[1] - is_link = new_stat.st_mode & 0o170000 == 0o120000 - if is_link: + self.is_link = new_stat.st_mode & 0o170000 == 0o120000 + if self.is_link: new_stat = self.preload[0] self.preload = None self.exists = True if new_stat else False -- cgit 1.4.1-2-gfad0