diff options
author | hut <hut@lavabit.com> | 2010-05-06 02:05:16 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-05-06 02:05:16 +0200 |
commit | caacb5e7effb958b19e8c64a7f394baa5ddc7a03 (patch) | |
tree | c8f1a3eef8bb4637693ae5d69fab50909a788c22 | |
parent | 83f08a2c6fb92269031af2991eed3c26ec816d3d (diff) | |
download | ranger-caacb5e7effb958b19e8c64a7f394baa5ddc7a03.tar.gz |
fsobject: bugfix
-rw-r--r-- | ranger/fsobject/fsobject.py | 6 |
1 files 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 |