diff options
author | hut <hut@lavabit.com> | 2012-12-17 15:18:25 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2012-12-17 15:18:25 +0100 |
commit | 697082ecf15f2ce8e380e9aca054449a8cf23b0a (patch) | |
tree | f972451cb477ff6382dc1640f1e32bb5ec909e3e | |
parent | b434ff26739aec5ec7520cad7a552fadb1ddf0d3 (diff) | |
download | ranger-697082ecf15f2ce8e380e9aca054449a8cf23b0a.tar.gz |
widgets.statusbar: avoid an exception on bad current path
-rw-r--r-- | ranger/gui/widgets/statusbar.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ranger/gui/widgets/statusbar.py b/ranger/gui/widgets/statusbar.py index 3c9d0ed8..d87ff291 100644 --- a/ranger/gui/widgets/statusbar.py +++ b/ranger/gui/widgets/statusbar.py @@ -140,7 +140,11 @@ class StatusBar(Widget): and self.column.target.is_directory: target = self.column.target.pointed_obj else: - target = self.fm.thistab.at_level(0).pointed_obj + directory = self.fm.thistab.at_level(0) + if directory: + target = directory.pointed_obj + else: + return try: stat = target.stat except: |