From 48325410c2e8830a826b5571deba87f56d264d7c Mon Sep 17 00:00:00 2001 From: onefang Date: Tue, 5 Nov 2019 21:04:35 +1000 Subject: Don't stick a _ at the end of the results file name for the no IP case. --- apt-panopticon.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'apt-panopticon.lua') diff --git a/apt-panopticon.lua b/apt-panopticon.lua index 788d72c..84a6bed 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua @@ -608,7 +608,9 @@ if 0 < #arg then checkHost(pu.host, pu.host, pu.path, arg[2], arg[3]) end logFile:close() - local rfile, e = io.open("results/" .. pu.host .. "_" .. ip .. ".lua", "w+") + local f = pu.host + if "" ~= ip then f = f .. "_" .. ip end + local rfile, e = io.open("results/" .. f .. ".lua", "w+") if nil == rfile then C("opening results file - " .. e) else rfile:write(dumpTable(results, "", "results") .. "\nreturn results\n") rfile:close() -- cgit v1.1