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 13, 2018
1 parent 459b92c commit 0c7de19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion notebook/notebookapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def init_settings(self, jupyter_app, kernel_manager, contents_manager,
now = utcnow()

root_dir = contents_manager.root_dir
home = os.path.expanduser('~')
home = py3compat.str_to_unicode(os.path.expanduser('~'), encoding=sys.getfilesystemencoding())
if root_dir.startswith(home + os.path.sep):
# collapse $HOME to ~
root_dir = '~' + root_dir[len(home):]
Expand Down

0 comments on commit 0c7de19

Please sign in to comment.