Skip to content

Commit

Permalink
Merge pull request #3664 from vit-tucek/unicode_home_dirs
Browse files Browse the repository at this point in the history
properly handle unicode characters in home dirs
  • Loading branch information
minrk authored Oct 18, 2018
2 parents 9928105 + 0c7de19 commit 4f9a6cb
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 @@ -213,7 +213,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 4f9a6cb

Please sign in to comment.