##// END OF EJS Templates
windows: don't return early from building the hgrc search path...
Matt Harbison -
r44376:fa3835a1 default
parent child Browse files
Show More
@@ -38,16 +38,15 b' def systemrcpath():'
38 value = util.lookupreg(
38 value = util.lookupreg(
39 b'SOFTWARE\\Mercurial', None, winreg.HKEY_LOCAL_MACHINE
39 b'SOFTWARE\\Mercurial', None, winreg.HKEY_LOCAL_MACHINE
40 )
40 )
41 if not isinstance(value, bytes) or not value:
41 if value and isinstance(value, bytes):
42 return rcpath
42 value = util.localpath(value)
43 value = util.localpath(value)
43 for p in value.split(pycompat.ospathsep):
44 for p in value.split(pycompat.ospathsep):
44 if p.lower().endswith(b'mercurial.ini'):
45 if p.lower().endswith(b'mercurial.ini'):
45 rcpath.append(p)
46 rcpath.append(p)
46 elif os.path.isdir(p):
47 elif os.path.isdir(p):
47 for f, kind in util.listdir(p):
48 for f, kind in util.listdir(p):
48 if f.endswith(b'.rc'):
49 if f.endswith(b'.rc'):
49 rcpath.append(os.path.join(p, f))
50 rcpath.append(os.path.join(p, f))
51 return rcpath
50 return rcpath
52
51
53
52
General Comments 0
You need to be logged in to leave comments. Login now