aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian C. (anrxc) <anrxc@sysphere.org>2010-03-11 17:25:20 +0100
committerAdrian C. (anrxc) <anrxc@sysphere.org>2010-03-11 17:25:20 +0100
commitde1593412099dd36b0611d00776adb4bdc1805e1 (patch)
tree2a40abbd5cef1f371a3a3a712a66bb7ecfd61f26
parent3178068b962bca4f97d5e69a96375b865feb8d01 (diff)
downloadvicious-legacy-de1593412099dd36b0611d00776adb4bdc1805e1.tar.xz
fs: further improve the regexp
-rw-r--r--fs.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs.lua b/fs.lua
index 27934c4..fdc35aa 100644
--- a/fs.lua
+++ b/fs.lua
@@ -30,8 +30,8 @@ local function worker(format, nfs)
local fs_info = {}
for line in f:lines() do -- Match: (size) (used)(avail)(use%) (mount)
- local s = string.match(line, "^.-[%s]+([%d]+)")
- local u,a,p = string.match(line, "([%d]+)[%s]+([%d]+)[%s]+([%d]+)%%")
+ local s = string.match(line, "^.-[%s]([%d]+)")
+ local u,a,p = string.match(line, "([%d]+)[%D]+([%d]+)[%D]+([%d]+)%%")
local m = string.match(line, "%%[%s]([%p%w]+)")
if u and m then -- Handle 1st line and broken regexp