From 949e5837aa110d75b1ca4eadf23728bf34fd8502 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 23 Dec 2023 23:37:45 +0800 Subject: support local resource #4528 --- .../modules/private/action/require/impl/actions/download_resources.lua | 2 ++ 1 file changed, 2 insertions(+) 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"), -- cgit v1.3.1