diff options
author | Adam Harrison <adamdharrison@gmail.com> | 2022-11-02 23:54:09 -0400 |
---|---|---|
committer | Adam Harrison <adamdharrison@gmail.com> | 2022-11-02 23:54:09 -0400 |
commit | c50cb4c488f2e5dd14692b5625adce89c5f00462 (patch) | |
tree | 6dffd22a10cf20c7cc8174de847f9f6586f9f106 /src | |
parent | 20b772483d09247b634f0d70fcd0b18fae8cd65c (diff) | |
download | lite-xl-plugin-manager-c50cb4c488f2e5dd14692b5625adce89c5f00462.tar.gz lite-xl-plugin-manager-c50cb4c488f2e5dd14692b5625adce89c5f00462.zip |
Inverted order.
Diffstat (limited to 'src')
-rw-r--r-- | src/lpm.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lpm.lua b/src/lpm.lua index 54bce83..ea75c70 100644 --- a/src/lpm.lua +++ b/src/lpm.lua @@ -463,7 +463,7 @@ function common.get(source, target, checksum) local cache_path = CACHEDIR .. PATHSEP .. "files" .. PATHSEP .. checksum if not system.stat(cache_path) then system.get(source, cache_path) - if system.hash(cache_path, "file") ~= checksum and checksum ~= "SKIP" then fatal_warning("checksum doesn't match for " .. source) end + if checksum ~= "SKIP" and system.hash(cache_path, "file") ~= checksum then fatal_warning("checksum doesn't match for " .. source) end end common.copy(cache_path, target) end @@ -616,7 +616,7 @@ function Plugin:install(bottle, installing) log_action("Downloading file " .. file.url .. "...") common.get(file.url, temporary_path, file.checksum) log_action("Downloaded file " .. file.url .. " to " .. path) - if system.hash(temporary_path, "file") ~= file.checksum and file.checksum ~= "SKIP" then fatal_warning("checksum doesn't match for " .. path) end + if file.checksum ~= "SKIP" and system.hash(temporary_path, "file") ~= file.checksum then fatal_warning("checksum doesn't match for " .. path) end end end end @@ -902,7 +902,7 @@ function LiteXL:install() log_action("Downloading file " .. file.url .. "...") common.get(file.url, path, file.checksum) log_action("Downloaded file " .. file.url .. " to " .. path) - if system.hash(path, "file") ~= file.checksum and file.checksum ~= "SKIP" then fatal_warning("checksum doesn't match for " .. path) end + if file.checksum ~= "SKIP" and system.hash(path, "file") ~= file.checksum then fatal_warning("checksum doesn't match for " .. path) end if archive then log_action("Extracting file " .. basename .. " in " .. self.local_path) system.extract(path, self.local_path) |