summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2013-02-06 18:33:31 +0100
committerhut <hut@lavabit.com>2013-02-06 18:33:31 +0100
commitfdb5224dc3272ffefb8d57dd07388740752515db (patch)
tree95b751221e6e17e69a8dd66276c7dc4318954f32 /ranger
parent09970fbcdb0adfefd65a51c108148fc38303324b (diff)
downloadranger-fdb5224dc3272ffefb8d57dd07388740752515db.tar.gz
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 <some_filename>.
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 <some_filename> from point 2. Now
the symlink looks as intended.
7. While cursos stays on <some_file>, 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]
Diffstat (limited to 'ranger')
-rw-r--r--ranger/fsobject/fsobject.py4
1 files 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