diff options
author | hut <hut@lavabit.com> | 2010-02-04 01:48:05 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-02-04 01:48:05 +0100 |
commit | 51e9b18e6d16c1ddd686f54e0779420722a7ffb3 (patch) | |
tree | 52d61d9d48fc8ae489a4f1af732a4a5d62266018 | |
parent | a811c7ec5ae1a8c7968f2c00dd757e86402d419e (diff) | |
download | ranger-51e9b18e6d16c1ddd686f54e0779420722a7ffb3.tar.gz |
added some safety checks
-rw-r--r-- | ranger/actions.py | 3 | ||||
-rw-r--r-- | ranger/fsobject/directory.py | 3 |
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): |