Fix issue
This commit is contained in:
1 parent
b76c21bf74
commit
3ebb2d08d6
1 file changed
+3
-1
@@ -115,7 +115,7 @@ elseif args[1] == "add_card" then
|
|||||||
local card_hash = hash(new_card)
|
local card_hash = hash(new_card)
|
||||||
|
|
||||||
local key_file = fs.open(card_hash..'.key', 'w')
|
local key_file = fs.open(card_hash..'.key', 'w')
|
||||||
key_file.write(new_card)
|
key_file.write(new_card..'\n')
|
||||||
key_file.close()
|
key_file.close()
|
||||||
|
|
||||||
local trusted_keys = fs.open(dir..config.key_file, 'a')
|
local trusted_keys = fs.open(dir..config.key_file, 'a')
|
||||||
@@ -133,6 +133,8 @@ elseif args[1] == "remove_card" then
|
|||||||
local trusted_hash = trusted_keys.readLine()
|
local trusted_hash = trusted_keys.readLine()
|
||||||
if trusted_hash ~= key_hash then
|
if trusted_hash ~= key_hash then
|
||||||
table.insert(new_key_table, trusted_hash)
|
table.insert(new_key_table, trusted_hash)
|
||||||
|
else
|
||||||
|
print("Removed "..key_hash)
|
||||||
end
|
end
|
||||||
if not trusted_hash then break end -- Stop when EOF reached
|
if not trusted_hash then break end -- Stop when EOF reached
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in new issue
Block a user