summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/fsobject/directory.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/ranger/fsobject/directory.py b/ranger/fsobject/directory.py
index f1810915..1079d126 100644
--- a/ranger/fsobject/directory.py
+++ b/ranger/fsobject/directory.py
@@ -1,6 +1,8 @@
+import os
 from collections import deque
 from time import time
 
+from ranger import log
 from ranger.fsobject import BAD_INFO, File, FileSystemObject
 from ranger.shared import SettingsAware
 from ranger.ext.accumulator import Accumulator
@@ -31,6 +33,7 @@ class Directory(FileSystemObject, Accumulator, SettingsAware):
 	scroll_offset = 0
 
 	last_update_time = -1
+	load_content_mtime = -1
 
 	old_show_hidden = None
 	old_directories_first = None
@@ -182,6 +185,7 @@ class Directory(FileSystemObject, Accumulator, SettingsAware):
 			self.last_update_time = time()
 
 		finally:
+			self.load_content_mtime = os.lstat(self.path).st_mtime
 			self.loading = False
 
 	def unload(self):
@@ -329,13 +333,12 @@ class Directory(FileSystemObject, Accumulator, SettingsAware):
 			self.load_content(*a, **k)
 			return True
 
-		import os
 		try:
 			real_mtime = os.lstat(self.path).st_mtime
 		except OSError:
 			real_mtime = None
 		if self.stat:
-			cached_mtime = self.stat.st_mtime
+			cached_mtime = self.load_content_mtime
 		else:
 			cached_mtime = 0
 
5fa8e972 ^
cce9cda9 ^

5c105a7a ^
5fa8e972 ^



























cce9cda9 ^

5fa8e972 ^



cce9cda9 ^

5c105a7a ^
5fa8e972 ^















cce9cda9 ^

5c105a7a ^
5fa8e972 ^




















8766aa12 ^
5fa8e972 ^


cce9cda9 ^

a3f77915 ^

5fa8e972 ^
a3f77915 ^
cce9cda9 ^

a3f77915 ^
5fa8e972 ^




a3f77915 ^
5fa8e972 ^









a3f77915 ^
cce9cda9 ^

da791479 ^
cce9cda9 ^

5c105a7a ^
cce9cda9 ^
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135