diff options
| author | ruki <[email protected]> | 2023-12-23 23:37:45 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-12-23 23:38:04 +0800 |
| commit | 949e5837aa110d75b1ca4eadf23728bf34fd8502 (patch) | |
| tree | 0c06e1bbc4e0543b8e01f4de4c6e714397c51bdb | |
| parent | 728f688974dd7fc9afec6311a9db862b426a9291 (diff) | |
support local resource #4528
| -rw-r--r-- | xmake/modules/private/action/require/impl/actions/download_resources.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/xmake/modules/private/action/require/impl/actions/download_resources.lua b/xmake/modules/private/action/require/impl/actions/download_resources.lua index 9fc3da6c2..df87daf32 100644 --- a/xmake/modules/private/action/require/impl/actions/download_resources.lua +++ b/xmake/modules/private/action/require/impl/actions/download_resources.lua @@ -113,6 +113,8 @@ function _download(package, resource_name, resource_url, resource_hash) if localfile and os.isfile(localfile) then -- we can use local resource from the search directories directly if network is too slow os.cp(localfile, resource_file) + elseif os.isfile(resource_url) then + os.cp(resource_url, resource_file) elseif resource_url:find(string.ipattern("https-://")) or resource_url:find(string.ipattern("ftps-://")) then http.download(resource_url, resource_file, { insecure = global.get("insecure-ssl"), |
