diff --git a/IPython/utils/path.py b/IPython/utils/path.py index 3fc6a6f..555d7dc 100644 --- a/IPython/utils/path.py +++ b/IPython/utils/path.py @@ -201,6 +201,9 @@ def get_home_dir(require_writable=False): return py3compat.cast_unicode(root, fs_encoding) 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 not _writable_dir(homedir) and os.name == 'nt': # expanduser failed, use the registry to get the 'My Documents' folder.