summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-02-04 01:48:05 +0100
committerhut <hut@lavabit.com>2010-02-04 01:48:05 +0100
commit51e9b18e6d16c1ddd686f54e0779420722a7ffb3 (patch)
tree52d61d9d48fc8ae489a4f1af732a4a5d62266018 /ranger
parenta811c7ec5ae1a8c7968f2c00dd757e86402d419e (diff)
downloadranger-51e9b18e6d16c1ddd686f54e0779420722a7ffb3.tar.gz
added some safety checks
Diffstat (limited to 'ranger')
-rw-r--r--ranger/actions.py3
-rw-r--r--ranger/fsobject/directory.py3
2 files changed, 5 insertions, 1 deletions
diff --git a/ranger/actions.py b/ranger/actions.py
index 095dc24b..bf6b5894 100644
--- a/ranger/actions.py
+++ b/ranger/actions.py
@@ -364,6 +364,9 @@ class Actions(EnvironmentAware, SettingsAware):
 
 		pwd = self.env.pwd
 
+		if not pwd.accessible:
+			return
+
 		if movedown is None:
 			movedown = not all
 
diff --git a/ranger/fsobject/directory.py b/ranger/fsobject/directory.py
index 25da0ca6..0d417c96 100644
--- a/ranger/fsobject/directory.py
+++ b/ranger/fsobject/directory.py
@@ -393,7 +393,8 @@ class Directory(FileSystemObject, Accumulator, SettingsAware):
 
 	def __len__(self):
 		"""The number of containing files"""
-		if not self.accessible: raise ranger.fsobject.NotLoadedYet()
+		if not self.accessible or not self.content_loaded:
+			raise ranger.fsobject.NotLoadedYet()
 		return len(self.files)
 
 	def __eq__(self, other):
alt'>
c83dca9c ^







71eb22a5 ^
c83dca9c ^

71eb22a5 ^
c83dca9c ^


































480fd995 ^
















































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