aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/apt-panopticon.lua
diff options
context:
space:
mode:
Diffstat (limited to 'apt-panopticon.lua')
-rwxr-xr-xapt-panopticon.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/apt-panopticon.lua b/apt-panopticon.lua
index 4981ad3..8f953d0 100755
--- a/apt-panopticon.lua
+++ b/apt-panopticon.lua
@@ -955,10 +955,12 @@ os.execute('sleep 1') -- Wait for things to start up before checking for them.
955 local num = '[%d%.]+[kM]?' 955 local num = '[%d%.]+[kM]?'
956 if APT.checkFile(f) then 956 if APT.checkFile(f) then
957 for l in io.lines(f) do 957 for l in io.lines(f) do
958 local speed, crrnt = l:match('^%c *'..num..' +'..num..' +%d+ +%d+[kM]? +%d+ +%d+ +('..num..') +%d+ +[%d%-]+:[%d%-]+:[%d%-]+ +[%d%-]+:[%d%-]+:[%d%-]+ +[%d%-]+:[%d%-]+:[%d%-]+ +('..num..')') 958 local speed, crrnt = l:match('^%c *'..num..' +'..num..' +%d+ +'..num..' +%d+ +%d+ +('..num..') +%d+ +[%d%-]+:[%d%-]+:[%d%-]+ +[%d%-]+:[%d%-]+:[%d%-]+ +[%d%-]+:[%d%-]+:[%d%-]+ +('..num..')')
959 if nil ~= speed then 959 if nil ~= speed then
960 if 'k' == speed:sub(-1, -1) then speed = speed:sub(1, -2) .. '000' end 960 if 'k' == speed:sub(-1, -1) then speed = speed:sub(1, -2) .. '000' end
961 if 'k' == crrnt:sub(-1, -1) then crrnt = crrnt:sub(1, -2) .. '000' end 961 if 'k' == crrnt:sub(-1, -1) then crrnt = crrnt:sub(1, -2) .. '000' end
962 if 'M' == speed:sub(-1, -1) then speed = speed:sub(1, -2) .. '000000' end
963 if 'M' == crrnt:sub(-1, -1) then crrnt = crrnt:sub(1, -2) .. '000000' end
962 speed = tonumber(speed) 964 speed = tonumber(speed)
963 crrnt = tonumber(crrnt) 965 crrnt = tonumber(crrnt)
964 if speed < min and speed ~= 0 then min = speed end 966 if speed < min and speed ~= 0 then min = speed end