summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/fsobject/directory.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/ranger/fsobject/directory.py b/ranger/fsobject/directory.py
index 136752f8..9942984a 100644
--- a/ranger/fsobject/directory.py
+++ b/ranger/fsobject/directory.py
@@ -112,9 +112,9 @@ class Directory(FileSystemObject, SettingsAware):
 
 		self.loading = True
 		self.load_if_outdated()
-		yield
 
 		if self.exists and self.runnable:
+			yield
 			filenames = []
 			for fname in listdir(self.path):
 				if not self.settings.show_hidden and fname[0] == '.':
@@ -122,17 +122,13 @@ class Directory(FileSystemObject, SettingsAware):
 				if isinstance(self.filter, str) and self.filter in fname:
 					continue
 				filenames.append(join(self.path, fname))
-			self.scroll_offset = 0
-			self.filenames = filenames
-			self.infostring = ' %d' % len(self.filenames) # update the infostring
 			yield
 
 			marked_paths = set(map( \
 					lambda obj: obj.path, self.marked_items))
-			self._clear_marked_items()
 
 			files = []
-			for name in self.filenames:
+			for name in filenames:
 				if isdir(name):
 					try:
 						item = self.fm.env.get_directory(name)
@@ -144,8 +140,12 @@ class Directory(FileSystemObject, SettingsAware):
 				files.append(item)
 				yield
 
+			self.scroll_offset = 0
+			self.filenames = filenames
+			self.infostring = ' %d' % len(self.filenames) # update the infostring
 			self.files = files
 
+			self._clear_marked_items()
 			for item in self.files:
 				if item.path in marked_paths:
 					self.mark_item(item, True)
c/ranger.html?h=v1.9.0b6&id=b3556b21e23eb3381b220e0d3319d94b3a89e0ac'>b3556b21 ^
f07bb12f ^

f07bb12f ^











4e9450f9 ^
f07bb12f ^
4e9450f9 ^
f07bb12f ^














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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65