diff options
author | hut <hut@lepus.uberspace.de> | 2014-11-02 17:40:00 +0100 |
---|---|---|
committer | hut <hut@lepus.uberspace.de> | 2014-11-02 17:40:00 +0100 |
commit | 2c7d36041103b4b282261edd0fd17ef5d4b722e1 (patch) | |
tree | 0a274708097333b7d24eb71a29d8d03b025dc074 /ranger | |
parent | c791b0ad0b1b5186b71f8d6578ed619fefc16f5d (diff) | |
download | ranger-2c7d36041103b4b282261edd0fd17ef5d4b722e1.tar.gz |
core.actions: Avoid UnicodeDecodeError, fixes #172
Thanks to cym13 and GermainZ for looking into this
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/core/actions.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py index 92d626c0..ba6b3658 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -819,7 +819,8 @@ 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()) + '.jpg' + sha1(path.encode('utf-8', 'backslashreplace')) \ + .hexdigest()) + '.jpg' else: def sha1_encode(self, path): return os.path.join(ranger.CACHEDIR, |