about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2019-03-05 00:28:25 +0100
committertoonn <toonn@toonn.io>2019-03-05 00:28:25 +0100
commitf70c6560b6e950168b0b4481e1f20a7df121d60d (patch)
tree383a80cf35ebe9e19d2d77771213143422ae296e
parentf7e8bc3e3f4fcb0e1525bc4d77e899786d66cc43 (diff)
parent31494870fffe15d37d218727ae87dae6518ed365 (diff)
downloadranger-f70c6560b6e950168b0b4481e1f20a7df121d60d.tar.gz
Merge branch 'rnhmjoj-invalid-mtimes'
-rw-r--r--ranger/gui/widgets/statusbar.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/ranger/gui/widgets/statusbar.py b/ranger/gui/widgets/statusbar.py
index 3457955e..f068bc7e 100644
--- a/ranger/gui/widgets/statusbar.py
+++ b/ranger/gui/widgets/statusbar.py
@@ -183,7 +183,11 @@ class StatusBar(Widget):  # pylint: disable=too-many-instance-attributes
                 left.add(target.infostring.replace(" ", ""))
                 left.add_space()
 
-            left.add(strftime(self.timeformat, localtime(stat.st_mtime)), 'mtime')
+            try:
+                date = strftime(self.timeformat, localtime(stat.st_mtime))
+            except OSError:
+                date = '?'
+            left.add(date, 'mtime')
 
         directory = target if target.is_directory else \
             target.fm.get_directory(os.path.dirname(target.path))