about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorGermainZ <germanosz@gmail.com>2014-03-09 22:31:27 +0200
committerGermainZ <germanosz@gmail.com>2014-03-09 22:31:27 +0200
commitb4b3bc6e8a0ba9a5855120bbec8712bb34bbd25a (patch)
tree202ef9f2a374c4c3abb1739e128f74a06cb08765
parent91daf58b56c7b84361f6be52097b753e737f3002 (diff)
downloadranger-b4b3bc6e8a0ba9a5855120bbec8712bb34bbd25a.tar.gz
Add extension
-rw-r--r--ranger/core/actions.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index a3497902..2dfb116e 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -802,10 +802,12 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware):
 
     if version_info[0] == 3:
         def sha1_encode(self, path):
-            return os.path.join(ranger.CACHEDIR, sha1(path.encode('utf-8')).hexdigest())
+            return os.path.join(ranger.CACHEDIR,
+                    sha1(path.encode('utf-8')).hexdigest()) + '.jpg'
     else:
         def sha1_encode(self, path):
-            return os.path.join(ranger.CACHEDIR, sha1(path).hexdigest())
+            return os.path.join(ranger.CACHEDIR,
+                    sha1(path).hexdigest()) + '.jpg'
 
     def get_preview(self, file, width, height):
         pager = self.ui.get_pager()