mercurial/util_win32.py
changeset 5612 7c976bb039af
parent 5583 1b5b81d9039b
parent 5611 60bd4e707a7d
child 5619 55d3e845736a
equal deleted inserted replaced
5603:74f65f44a9aa 5612:7c976bb039af
   203     return [os.path.join(os.path.dirname(filename), 'mercurial.ini')]
   203     return [os.path.join(os.path.dirname(filename), 'mercurial.ini')]
   204 
   204 
   205 def user_rcpath_win32():
   205 def user_rcpath_win32():
   206     '''return os-specific hgrc search path to the user dir'''
   206     '''return os-specific hgrc search path to the user dir'''
   207     userdir = os.path.expanduser('~')
   207     userdir = os.path.expanduser('~')
   208     if userdir == '~':
   208     if sys.getwindowsversion() != 2 and userdir == '~':
   209         # We are on win < nt: fetch the APPDATA directory location and use
   209         # We are on win < nt: fetch the APPDATA directory location and use
   210         # the parent directory as the user home dir.
   210         # the parent directory as the user home dir.
   211         appdir = shell.SHGetPathFromIDList(
   211         appdir = shell.SHGetPathFromIDList(
   212             shell.SHGetSpecialFolderLocation(0, shellcon.CSIDL_APPDATA))
   212             shell.SHGetSpecialFolderLocation(0, shellcon.CSIDL_APPDATA))
   213         userdir = os.path.dirname(appdir)
   213         userdir = os.path.dirname(appdir)