mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
sb: Fix the downloader file:// URL to copy the file to the local path.
This commit is contained in:
@@ -262,9 +262,9 @@ def _file_parser(source, pathkey, config, opts):
|
||||
#
|
||||
_local_path(source, pathkey, config)
|
||||
#
|
||||
# Symlink.
|
||||
# Get the paths sorted.
|
||||
#
|
||||
source['symlink'] = source['local']
|
||||
source['file'] = source['url'][6:]
|
||||
|
||||
parsers = { 'http': _http_parser,
|
||||
'ftp': _http_parser,
|
||||
@@ -510,9 +510,11 @@ def _cvs_downloader(url, local, config, opts):
|
||||
return True
|
||||
|
||||
def _file_downloader(url, local, config, opts):
|
||||
if path.exists(local):
|
||||
return True
|
||||
return path.isdir(url)
|
||||
try:
|
||||
path.copy(url[6:], local)
|
||||
except:
|
||||
return False
|
||||
return True
|
||||
|
||||
downloaders = { 'http': _http_downloader,
|
||||
'ftp': _http_downloader,
|
||||
|
Reference in New Issue
Block a user