From d341c45cf45bfb0c88ca518e994c83ac3c804195 Mon Sep 17 00:00:00 2001 From: dmiller Date: Tue, 4 Feb 2020 18:57:02 +0000 Subject: [PATCH] Fix io.close calls in whois-ip --- scripts/whois-ip.nse | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/whois-ip.nse b/scripts/whois-ip.nse index c53790277..b89438453 100644 --- a/scripts/whois-ip.nse +++ b/scripts/whois-ip.nse @@ -1910,12 +1910,12 @@ function file_stat( path ) local f, err = io.open(path, 'r') if f then - f.close() + f:close() exists = true readable = true f, err = io.open(path, 'a') if f then - f.close() + f:close() writable = true elseif err:match('Permission denied') then writable = false @@ -1924,11 +1924,11 @@ function file_stat( path ) exists = false f, err = io.open(path, 'w') if f then - f.close() + f:close() writable = true f, err = io.open(path, 'r') if f then - f.close() + f:close() readable = true elseif err:match('Permission denied') then readable = false