mercurial/util_win32.py
changeset 5611 60bd4e707a7d
parent 4998 81f8ff2a9bf2
child 5612 7c976bb039af
child 5879 cacfeee38870
equal deleted inserted replaced
5584:d2831a5d5947 5611:60bd4e707a7d
   188     return [os.path.join(os.path.dirname(filename), 'mercurial.ini')]
   188     return [os.path.join(os.path.dirname(filename), 'mercurial.ini')]
   189 
   189 
   190 def user_rcpath_win32():
   190 def user_rcpath_win32():
   191     '''return os-specific hgrc search path to the user dir'''
   191     '''return os-specific hgrc search path to the user dir'''
   192     userdir = os.path.expanduser('~')
   192     userdir = os.path.expanduser('~')
   193     if userdir == '~':
   193     if sys.getwindowsversion() != 2 and userdir == '~':
   194         # We are on win < nt: fetch the APPDATA directory location and use
   194         # We are on win < nt: fetch the APPDATA directory location and use
   195         # the parent directory as the user home dir.
   195         # the parent directory as the user home dir.
   196         appdir = shell.SHGetPathFromIDList(
   196         appdir = shell.SHGetPathFromIDList(
   197             shell.SHGetSpecialFolderLocation(0, shellcon.CSIDL_APPDATA))
   197             shell.SHGetSpecialFolderLocation(0, shellcon.CSIDL_APPDATA))
   198         userdir = os.path.dirname(appdir)
   198         userdir = os.path.dirname(appdir)