Explicitly try the default configuration
Up to now we assumed that the default config is in a path where xdgConfigFind() finds it. However, evidently this is not always the case, so make this explicitly try the default configuration file. Fixes: https://github.com/awesomeWM/awesome/issues/1346 Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
b9b59be816
commit
9922c3c8e9
1
config.h
1
config.h
|
@ -4,6 +4,7 @@
|
||||||
#define AWESOME_LUA_LIB_PATH "@AWESOME_LUA_LIB_PATH@"
|
#define AWESOME_LUA_LIB_PATH "@AWESOME_LUA_LIB_PATH@"
|
||||||
#define XDG_CONFIG_DIR "@XDG_CONFIG_DIR@"
|
#define XDG_CONFIG_DIR "@XDG_CONFIG_DIR@"
|
||||||
#define AWESOME_IS_BIG_ENDIAN @AWESOME_IS_BIG_ENDIAN@
|
#define AWESOME_IS_BIG_ENDIAN @AWESOME_IS_BIG_ENDIAN@
|
||||||
|
#define AWESOME_DEFAULT_CONF "@AWESOME_SYSCONFDIR@/rc.lua"
|
||||||
|
|
||||||
#cmakedefine WITH_DBUS
|
#cmakedefine WITH_DBUS
|
||||||
#cmakedefine HAS_EXECINFO
|
#cmakedefine HAS_EXECINFO
|
||||||
|
|
7
luaa.c
7
luaa.c
|
@ -885,8 +885,13 @@ luaA_find_config(xdgHandle* xdg, const char *confpatharg, luaA_config_callback *
|
||||||
}
|
}
|
||||||
tmp += a_strlen(tmp) + 1;
|
tmp += a_strlen(tmp) + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
p_delete(&confpath);
|
p_delete(&confpath);
|
||||||
|
|
||||||
|
if(callback(AWESOME_DEFAULT_CONF))
|
||||||
|
{
|
||||||
|
return a_strdup(AWESOME_DEFAULT_CONF);
|
||||||
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue