summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lbu-listchanges-html.lsp2
-rw-r--r--lbu-model.lua11
2 files changed, 8 insertions, 5 deletions
diff --git a/lbu-listchanges-html.lsp b/lbu-listchanges-html.lsp
index 42d6387..d49d010 100644
--- a/lbu-listchanges-html.lsp
+++ b/lbu-listchanges-html.lsp
@@ -35,7 +35,7 @@ end %>
io.write("None")
else
for i,file in pairs(view.value) do
- io.write(html.html_escape(file.status .. "\t" .. file.name .. "\n"))
+ io.write((html.html_escape(file.status .. "\t" .. file.name .. "\n")))
end
end
%></pre></DD>
diff --git a/lbu-model.lua b/lbu-model.lua
index f3cd3b6..b5f9942 100644
--- a/lbu-model.lua
+++ b/lbu-model.lua
@@ -415,11 +415,14 @@ end
--]]
function getbackupfiles()
local files = {}
- local f = io.popen("PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin lbu lb 2>&1", "r")
- for line in f:lines() do
- files[#files + 1] = line
- end
+ local f = io.popen("PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin lbu lb 2>/dev/null", "r")
+ local content = f:read("*a") or ""
f:close()
+ if not string.match(content, "usage: lbu") then
+ for line in string.gmatch(content, "([^\n]+)\n?") do
+ files[#files + 1] = line
+ end
+ end
return cfe({ type="list", value=files, label="Backup archive list"})
end