diff --git a/frontend/util.lua b/frontend/util.lua index 7e44c1ce6..4f7398d05 100644 --- a/frontend/util.lua +++ b/frontend/util.lua @@ -920,7 +920,7 @@ end function util.diskUsage(dir) -- safe way of testing df & awk local function doCommand(d) - local handle = io.popen("df -k " .. d .. " 2>/dev/null | awk '$3 ~ /[0-9]+/ { print $2,$3,$4 }' 2>/dev/null || echo ::ERROR::") + local handle = io.popen("df -k " .. util.shell_escape({d}) .. " 2>/dev/null | awk '$3 ~ /[0-9]+/ { print $2,$3,$4 }' 2>/dev/null || echo ::ERROR::") if not handle then return end local output = handle:read("*all") handle:close()