summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/core/linemode.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/ranger/core/linemode.py b/ranger/core/linemode.py
index 8d53a9f8..e4c6c3a4 100644
--- a/ranger/core/linemode.py
+++ b/ranger/core/linemode.py
@@ -119,6 +119,8 @@ class MtimeLinemode(LinemodeBase):
         return fobj.relative_path
 
     def infostring(self, fobj, metadata):
+        if fobj.stat is None:
+            return '?'
         return datetime.fromtimestamp(fobj.stat.st_mtime).strftime("%Y-%m-%d %H:%M")
 
 
@@ -129,5 +131,7 @@ class SizeMtimeLinemode(LinemodeBase):
         return fobj.relative_path
 
     def infostring(self, fobj, metadata):
+        if fobj.stat is None:
+            return '?'
         return "%s %s" % (human_readable(fobj.size),
                           datetime.fromtimestamp(fobj.stat.st_mtime).strftime("%Y-%m-%d %H:%M"))