diff options
author | Chris Johns <chrisj@rtems.org> | 2015-06-16 20:57:06 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2015-06-16 20:57:06 +1000 |
commit | 5b5d6bff74fed9da7626805620670cfd22970c2f (patch) | |
tree | 1678f1f5e6e2dd3d5c903f89495b8f1ecc697f36 /source-builder/sb/download.py | |
parent | devel/qemu: Add support to build VDE if installed. (diff) | |
download | rtems-source-builder-5b5d6bff74fed9da7626805620670cfd22970c2f.tar.bz2 |
sb: Fix the downloader file:// URL to copy the file to the local path.
Diffstat (limited to 'source-builder/sb/download.py')
-rw-r--r-- | source-builder/sb/download.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source-builder/sb/download.py b/source-builder/sb/download.py index 5622d4a..624151b 100644 --- a/source-builder/sb/download.py +++ b/source-builder/sb/download.py @@ -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, |