From a079ab654d82f9edb0c55b942c3349313519bbd8 Mon Sep 17 00:00:00 2001 From: Lukas Hrazky Date: Sat, 24 Oct 2009 14:51:47 +0200 Subject: [PATCH] awful.util: change table.clone to do deep copies Signed-off-by: Lukas Hrazky Signed-off-by: Julien Danjou --- lib/awful/util.lua.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/awful/util.lua.in b/lib/awful/util.lua.in index 3c113978..f2ff7697 100644 --- a/lib/awful/util.lua.in +++ b/lib/awful/util.lua.in @@ -339,7 +339,11 @@ end function table.clone(t) local c = { } for k, v in pairs(t) do - c[k] = v + if type(v) == "table" then + c[k] = table.clone(v) + else + c[k] = v + end end return c end