diff options
author | hut <hut@lepus.uberspace.de> | 2015-01-17 03:57:37 +0100 |
---|---|---|
committer | hut <hut@lepus.uberspace.de> | 2015-01-17 03:57:37 +0100 |
commit | c32f82dbf0792766a8d1084324c1b94d8990aa36 (patch) | |
tree | 1c57cd574ebf81f7f3e8eec7d1a5209a4f1d13ea /ranger | |
parent | 80c0a1fc8701f4105250a9eabc5e730109574045 (diff) | |
download | ranger-c32f82dbf0792766a8d1084324c1b94d8990aa36.tar.gz |
container.directory: don't crash get_selection if files is None
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/container/directory.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ranger/container/directory.py b/ranger/container/directory.py index 486b23fe..3a609cf6 100644 --- a/ranger/container/directory.py +++ b/ranger/container/directory.py @@ -185,6 +185,8 @@ class Directory(FileSystemObject, Accumulator, Loadable): def get_selection(self): """READ ONLY""" self._gc_marked_items() + if not self.files: + return [] if self.marked_items: return [item for item in self.files if item.marked] elif self.pointed_obj: |