mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49:29 +00:00
Fix io.close calls in whois-ip
This commit is contained in:
parent
8515e83671
commit
d341c45cf4
1 changed files with 4 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue