Fix Windows paths with the list_config call.

This commit is contained in:
Chris Johns 2012-11-05 15:55:55 +11:00
parent 3bcb28731f
commit cbc9252650

View File

@ -434,10 +434,10 @@ class build:
def list_configs(opts, _defaults, ext = '.cfg'): def list_configs(opts, _defaults, ext = '.cfg'):
configs = [] configs = []
for cp in opts.expand('%{_configdir}', _defaults).split(':'): for cp in opts.expand('%{_configdir}', _defaults).split(':'):
print 'Examining: %s' % (os.path.abspath(cp)) print 'Examining: %s' % (path.host(path.abspath(cp)))
configs += glob.glob(os.path.join(cp, '*%s' % (ext))) configs += glob.glob(path.host(path.join(cp, '*%s' % (ext))))
for c in sorted(configs): for c in sorted(configs):
config = os.path.basename(c) config = path.basename(c)
if config.endswith(ext): if config.endswith(ext):
config = config[:0 - len(ext)] config = config[:0 - len(ext)]
print ' ', config print ' ', config