# HG changeset patch # User Kim Alvefur # Date 1641761224 -3600 # Node ID 866d0664495639f979707f63adf33b1361ada22b # Parent 33e856c6503373cd788a782088cef7ac3f87d8ba util.prosodyctl.cert: Fix boolean logic bug Boolean logic, never correct on the first try. We want to skip copying the same cert if it _has_ been imported already, not if it has not. diff -r 33e856c65033 -r 866d06644956 util/prosodyctl/cert.lua --- a/util/prosodyctl/cert.lua Sun Jan 09 18:52:58 2022 +0100 +++ b/util/prosodyctl/cert.lua Sun Jan 09 21:47:04 2022 +0100 @@ -223,7 +223,7 @@ local imported = {}; for _, host in ipairs(hostnames) do local paths = cm.find_cert_in_index(files_by_name, host); - if paths and not imported[paths.certificate] then + if paths and imported[paths.certificate] then -- One certificate, many mames! table.insert(imported, host); elseif paths then