From caacb5e7effb958b19e8c64a7f394baa5ddc7a03 Mon Sep 17 00:00:00 2001 From: hut Date: Thu, 6 May 2010 02:05:16 +0200 Subject: fsobject: bugfix --- ranger/fsobject/fsobject.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ranger/fsobject/fsobject.py b/ranger/fsobject/fsobject.py index 28e32055..3a2f6012 100644 --- a/ranger/fsobject/fsobject.py +++ b/ranger/fsobject/fsobject.py @@ -232,9 +232,6 @@ class FileSystemObject(MimeTypeAware, FileManagerAware): # Set some attributes if self.stat: - if self.is_link: - self.realpath = realpath(self.path) - self.readlink = os.readlink(self.path) mode = self.stat.st_mode self.is_device = bool(S_ISCHR(mode) or S_ISBLK(mode)) self.is_socket = bool(S_ISSOCK(mode)) @@ -247,6 +244,9 @@ class FileSystemObject(MimeTypeAware, FileManagerAware): else: self.exists = False self.runnable = False + if self.is_link and self.exists: + self.realpath = realpath(self.path) + self.readlink = os.readlink(self.path) else: self.accessible = False -- cgit 1.4.1-2-gfad0