Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/util_win32.py @ 4098:c08b6af023bc
util_win32.py: fix user_rcpath
Fixes issue504.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Fri, 16 Feb 2007 05:53:03 -0200 |
parents | 6b4127c7d52a |
children | 8c2a18cc3096 |
comparison
equal
deleted
inserted
replaced
4097:403c4ddd74bb | 4098:c08b6af023bc |
---|---|
185 filename = win32process.GetModuleFileNameEx(proc, 0) | 185 filename = win32process.GetModuleFileNameEx(proc, 0) |
186 except: | 186 except: |
187 filename = win32api.GetModuleFileName(0) | 187 filename = win32api.GetModuleFileName(0) |
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(): | 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 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. |