From 278ec5acd491bd7d94a224b216e5cbdfa34bf85d Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Fri, 7 Nov 2008 16:57:11 +0100 Subject: [PATCH] luaa: just expand path Signed-off-by: Julien Danjou --- luaa.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/luaa.c b/luaa.c index 92b32059f..e7f7c9f08 100644 --- a/luaa.c +++ b/luaa.c @@ -913,6 +913,11 @@ luaA_parserc(const char *confpatharg, bool run) ssize_t len; bool ret; + /* add XDG_CONFIG_DIR (/etc/xdg/awesome by default) as include path */ + snprintf(path, sizeof(path), + "package.path = package.path .. \";" XDG_CONFIG_DIR "/awesome/?.lua;" XDG_CONFIG_DIR "/awesome/?/init.lua\""); + luaA_dostring(globalconf.L, path); + ret = luaA_loadrc(confpatharg, run); confdir = getenv("XDG_CONFIG_HOME"); @@ -949,14 +954,6 @@ luaA_parserc(const char *confpatharg, bool run) xdg_config_dirs = XDG_CONFIG_DIR; len = sizeof(XDG_CONFIG_DIR) - 1; } - else - { - /* add XDG_CONFIG_DIR (/etc/xdg/awesome by default) as include path */ - snprintf(path, sizeof(path), - "package.path = package.path .. \";%s/awesome/?.lua;%s/awesome/?/init.lua\"", - XDG_CONFIG_DIR, XDG_CONFIG_DIR); - luaA_dostring(globalconf.L, path); - } xdg_files = a_strsplit(xdg_config_dirs, len, ':');