diff --git a/powerline/lib/vcs/git.py b/powerline/lib/vcs/git.py index 08edcd7f..d3d112fa 100644 --- a/powerline/lib/vcs/git.py +++ b/powerline/lib/vcs/git.py @@ -1,6 +1,9 @@ # vim:fileencoding=utf-8:noet +from __future__ import (unicode_literals, absolute_import, print_function) + import os +import sys import re from powerline.lib.vcs import get_branch_name as _get_branch_name, get_file_status @@ -26,7 +29,7 @@ def git_directory(directory): if os.path.isfile(path): with open(path, 'rb') as f: raw = f.read().partition(b':')[2].strip() - return os.path.abspath(os.path.join(directory, raw)) + return os.path.abspath(os.path.join(directory, raw.decode(sys.getfilesystemencoding() or 'utf-8'))) else: return path