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 7fbd069
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jupyter_core/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,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 7fbd069

Please sign in to comment.