mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
util_win32.py: fix user_rcpath
Fixes issue504.
This commit is contained in:
parent
79d891fab8
commit
c235d44d85
@ -801,7 +801,11 @@ if os.name == 'nt':
|
||||
|
||||
def user_rcpath():
|
||||
'''return os-specific hgrc search path to the user dir'''
|
||||
path = [os.path.join(os.path.expanduser('~'), 'mercurial.ini')]
|
||||
try:
|
||||
userrc = user_rcpath_win32()
|
||||
except:
|
||||
userrc = os.path.join(os.path.expanduser('~'), 'mercurial.ini')
|
||||
path = [userrc]
|
||||
userprofile = os.environ.get('USERPROFILE')
|
||||
if userprofile:
|
||||
path.append(os.path.join(userprofile, 'mercurial.ini'))
|
||||
|
@ -187,7 +187,7 @@ def system_rcpath_win32():
|
||||
filename = win32api.GetModuleFileName(0)
|
||||
return [os.path.join(os.path.dirname(filename), 'mercurial.ini')]
|
||||
|
||||
def user_rcpath():
|
||||
def user_rcpath_win32():
|
||||
'''return os-specific hgrc search path to the user dir'''
|
||||
userdir = os.path.expanduser('~')
|
||||
if userdir == '~':
|
||||
|
Loading…
Reference in New Issue
Block a user