mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
Fix host paths on Windows.
This commit is contained in:
@@ -461,8 +461,9 @@ def get_configs(opts, _defaults):
|
|||||||
|
|
||||||
configs = { 'paths': [], 'files': [] }
|
configs = { 'paths': [], 'files': [] }
|
||||||
for cp in opts.expand('%{_configdir}', _defaults).split(':'):
|
for cp in opts.expand('%{_configdir}', _defaults).split(':'):
|
||||||
configs['paths'] += [path.host(path.abspath(cp))]
|
hcp = path.host(path.abspath(cp))
|
||||||
configs['files'] += _scan(cp, ['.cfg', '.bset'])
|
configs['paths'] += [hcp]
|
||||||
|
configs['files'] += _scan(hcp, ['.cfg', '.bset'])
|
||||||
configs['files'] = sorted(configs['files'])
|
configs['files'] = sorted(configs['files'])
|
||||||
return configs
|
return configs
|
||||||
|
|
||||||
|
@@ -85,6 +85,7 @@ def isabspath(path):
|
|||||||
return path[0] == '/'
|
return path[0] == '/'
|
||||||
|
|
||||||
def mkdir(path):
|
def mkdir(path):
|
||||||
|
path = host(path)
|
||||||
if exists(path):
|
if exists(path):
|
||||||
if not isdir(path):
|
if not isdir(path):
|
||||||
raise error.general('path exists and is not a directory: %s' % (path))
|
raise error.general('path exists and is not a directory: %s' % (path))
|
||||||
@@ -111,6 +112,7 @@ def removeall(path):
|
|||||||
def _onerror(function, path, excinfo):
|
def _onerror(function, path, excinfo):
|
||||||
print 'removeall error: (%r) %s' % (function, path)
|
print 'removeall error: (%r) %s' % (function, path)
|
||||||
|
|
||||||
|
path = host(path)
|
||||||
shutil.rmtree(path, onerror = _onerror)
|
shutil.rmtree(path, onerror = _onerror)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user