about summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2020-10-04 16:24:44 +0200
committertoonn <toonn@toonn.io>2020-10-04 16:30:07 +0200
commit11a4264a9a77faa44f0ae67add2c140bdbd4f7ab (patch)
tree677b70ba27f5001dd3c3cb18e3086c463858b989 /ranger
parent240d8a0ea1b82690372ba067c24a3f581a29c782 (diff)
downloadranger-11a4264a9a77faa44f0ae67add2c140bdbd4f7ab.tar.gz
Fix encoding of cached filenames
A typo crept into the encoding of paths used for the hashes of cached
images. The error handler "backslashescape" doesn't exist, it should've
been "backslashreplace."

Fixes #2119
Diffstat (limited to 'ranger')
-rw-r--r--ranger/core/actions.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index ba31db58..adfbe94d 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -1025,7 +1025,7 @@ class Actions(  # pylint: disable=too-many-instance-attributes,too-many-public-m
             inode = stat(path).st_ino
         inode_path = "{0}{1}".format(str(inode), path)
         if PY3:
-            inode_path = inode_path.encode('utf-8', 'backslashescape')
+            inode_path = inode_path.encode('utf-8', 'backslashreplace')
         return '{0}.jpg'.format(sha512(inode_path).hexdigest())
 
     def get_preview(self, fobj, width, height):