Skip to content

Commit

Permalink
properly handle unicode characters in home dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
vit-tucek committed Jun 6, 2018
1 parent f1e18b8 commit 903a62d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jupyter_core/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import os
import sys
import tempfile
from builtins import str

pjoin = os.path.join

Expand All @@ -21,7 +22,8 @@ def get_home_dir():
homedir = os.path.expanduser('~')
# Next line will make things work even when /home/ is a symlink to
# /usr/home as it is on FreeBSD, for example
homedir = os.path.realpath(homedir)
if sys.version_info.major == 2:
homedir = homedir.decode(sys.getfilesystemencoding())
return homedir

_dtemps = {}
Expand Down

0 comments on commit 903a62d

Please sign in to comment.