1
0
mirror of https://github.com/wting/autojump synced 2024-10-27 20:34:07 +00:00

Fix bad encoding.

In python3, string.encode returns a byte array like:
b'14.1:\t/home/felix/devel/autojump'
This stops autojump from functioning at all.
This commit is contained in:
Felix Laurie von Massenbach 2014-06-26 02:00:17 +01:00
parent fbf932c4f2
commit 68b457184d

View File

@ -30,6 +30,8 @@ def create_dir(path):
def encode_local(string):
"""Converts string into user's preferred encoding."""
if is_python3():
return string
return string.encode(sys.getfilesystemencoding() or 'utf-8')