summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/core/linemode.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/ranger/core/linemode.py b/ranger/core/linemode.py
index 529c6b93..56fd3522 100644
--- a/ranger/core/linemode.py
+++ b/ranger/core/linemode.py
@@ -3,6 +3,7 @@
 # License: GNU GPL version 3, see the file "AUTHORS" for details.
 # Author: Wojciech Siewierski <wojciech.siewierski@onet.pl>, 2015
 
+import sys
 from abc import *
 
 DEFAULT_LINEMODE = "filename"
@@ -96,6 +97,8 @@ class FileInfoLinemode(LinemodeBase):
         if not file.is_directory:
             from subprocess import check_output
             fileinfo = check_output(["file", "-bL", file.path]).strip()
+            if sys.version_info[0] >= 3:
+                fileinfo = fileinfo.decode("utf-8")
             return fileinfo
         else:
             raise NotImplementedError