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
f='#n157'>157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189
;id=9e28a02f6a4345ec7b5fdee68864610186f34e91'>^




fa04a1e ^
16c3f0a ^

dee0f89 ^
16c3f0a ^



dee0f89 ^
fa04a1e ^
dee0f89 ^

2958579 ^
dee0f89 ^

589db74 ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45