diff options
| author | ruki <[email protected]> | 2020-09-11 22:47:35 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-09-11 22:47:35 +0800 |
| commit | fa0db916184f7b7b27af79eb4c184c163f547902 (patch) | |
| tree | d6a2e04786ff5526b4ea271662910c7f61d6627d /xmake/actions/require/impl/action/patch_sources.lua | |
| parent | 02433ff768af0842de49d3901df973c57bb43a5a (diff) | |
improve checksum
Diffstat (limited to 'xmake/actions/require/impl/action/patch_sources.lua')
| -rw-r--r-- | xmake/actions/require/impl/action/patch_sources.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/xmake/actions/require/impl/action/patch_sources.lua b/xmake/actions/require/impl/action/patch_sources.lua index 55c21abf3..d4ab76d07 100644 --- a/xmake/actions/require/impl/action/patch_sources.lua +++ b/xmake/actions/require/impl/action/patch_sources.lua @@ -32,6 +32,11 @@ function _patch(package, patch_url, patch_hash) -- get the patch file local patch_file = path.join(os.tmpdir(), "patches", package:name(), package:version_str(), (path.filename(patch_url):gsub("%?.+$", ""))) + -- ensure lower hash + if patch_hash then + patch_hash = patch_hash:lower() + end + -- the package file have been downloaded? local cached = true if option.get("force") or not os.isfile(patch_file) or patch_hash ~= hash.sha256(patch_file) then |
