From 9fce440078f4af300ee71b7b5cfca2b423f18622 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 3 May 2014 11:15:14 +0200 Subject: [PATCH] awful.util.geticonpath: Correctly localize variables This function was accidentally setting the global variable "icontypes". Fix this by adding the needed "local" and also localize some more variables for consistency. Signed-off-by: Uli Schlachter --- lib/awful/util.lua.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/awful/util.lua.in b/lib/awful/util.lua.in index 123c4a64c..76c88e204 100644 --- a/lib/awful/util.lua.in +++ b/lib/awful/util.lua.in @@ -184,10 +184,10 @@ end -- @param size Optional size. If this is specified, subdirectories x -- of the dirs are searched first function util.geticonpath(iconname, exts, dirs, size) - exts = exts or { 'png', 'gif' } - dirs = dirs or { '/usr/share/pixmaps/', '/usr/share/icons/hicolor/' } - icontypes = { 'apps', 'actions', 'categories', 'emblems', - 'mimetypes', 'status', 'devices', 'extras', 'places', 'stock' } + local exts = exts or { 'png', 'gif' } + local dirs = dirs or { '/usr/share/pixmaps/', '/usr/share/icons/hicolor/' } + local icontypes = { 'apps', 'actions', 'categories', 'emblems', + 'mimetypes', 'status', 'devices', 'extras', 'places', 'stock' } for _, d in pairs(dirs) do local icon for _, e in pairs(exts) do