summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/container/directory.py2
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: