diff --git a/config.h b/config.h index b599a90ed..26bb8c98a 100644 --- a/config.h +++ b/config.h @@ -4,6 +4,7 @@ #define AWESOME_LUA_LIB_PATH "@AWESOME_LUA_LIB_PATH@" #define XDG_CONFIG_DIR "@XDG_CONFIG_DIR@" #define AWESOME_IS_BIG_ENDIAN @AWESOME_IS_BIG_ENDIAN@ +#define AWESOME_DEFAULT_CONF "@AWESOME_SYSCONFDIR@/rc.lua" #cmakedefine WITH_DBUS #cmakedefine HAS_EXECINFO diff --git a/luaa.c b/luaa.c index 26e78bdba..f3e2b3d4d 100644 --- a/luaa.c +++ b/luaa.c @@ -885,8 +885,13 @@ luaA_find_config(xdgHandle* xdg, const char *confpatharg, luaA_config_callback * } tmp += a_strlen(tmp) + 1; } - p_delete(&confpath); + + if(callback(AWESOME_DEFAULT_CONF)) + { + return a_strdup(AWESOME_DEFAULT_CONF); + } + return NULL; }