From cbaefeed9dc06de6a26857e37e04bbde04038963 Mon Sep 17 00:00:00 2001 From: Cedric GESTES Date: Wed, 26 Aug 2009 17:49:38 +0200 Subject: [PATCH] rules: accept rule if regexp is ok or value is equal correct problem matching expression with - or special regexp character Signed-off-by: Cedric GESTES Signed-off-by: Julien Danjou --- lib/awful/rules.lua.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/awful/rules.lua.in b/lib/awful/rules.lua.in index b5c587a8..0591c25c 100644 --- a/lib/awful/rules.lua.in +++ b/lib/awful/rules.lua.in @@ -52,8 +52,10 @@ rules = {} function match(c, rule) for field, value in pairs(rule) do if c[field] then - if type(c[field]) == "string" and not c[field]:match(value) then - return false + if type(c[field]) == "string" then + if not c[field]:match(value) and c[field] ~= value then + return false + end elseif c[field] ~= value then return false end