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 |
|
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 |
|
|
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