diff --git CHANGELOG.md CHANGELOG.md index 38a0fc13..03e6b2f6 100644 --- CHANGELOG.md +++ CHANGELOG.md @@ -21,6 +21,11 @@ - `$XDG_DATA_HOME/luakit/local_storage -> $XDG_DATA_HOME/luakit/localstorage` - `$XDG_DATA_HOME/luakit/indexeddb -> $XDG_DATA_HOME/luakit/databases/indexeddb` +- Setting DEVELOPMENT_PATHS will now create /tmp/luakit-devhome/{config,data,cache} + and refrains from using the direcories in the users HOME directory. There won't + be a config file in the /tmp/luakit-devhome/config directory. But this directory + is searched first, with a fallback to the config directory in the luakit source + directory. ### Fixed diff --git luah.c luah.c index a5c97030..589db0a7 100644 --- luah.c +++ luah.c @@ -203,14 +203,14 @@ luaH_parserc(const gchar *confpath, gboolean run) /* compile list of config search paths */ paths = g_ptr_array_new_with_free_func(g_free); + /* search users config dir (see: XDG_CONFIG_HOME) */ + g_ptr_array_add(paths, g_build_filename(globalconf.config_dir, "rc.lua", NULL)); + #if DEVELOPMENT_PATHS /* allows for testing luakit in the project directory */ g_ptr_array_add(paths, g_strdup("./config/rc.lua")); #endif - /* search users config dir (see: XDG_CONFIG_HOME) */ - g_ptr_array_add(paths, g_build_filename(globalconf.config_dir, "rc.lua", NULL)); - /* search system config dirs (see: XDG_CONFIG_DIRS) */ config_dirs = g_get_system_config_dirs(); for(; *config_dirs; config_dirs++) diff --git luakit.c luakit.c index aa0c7e42..39cf733d 100644 --- luakit.c +++ luakit.c @@ -50,9 +50,17 @@ static void init_directories(void) { /* create luakit directory */ +#if DEVELOPMENT_PATHS + info("DEVELOPMENT_PATHS NOTICE: Luakit is using /tmp/luakit-devhome."); + globalconf.cache_dir = g_build_filename("/tmp/luakit-devhome/cache", globalconf.profile, NULL); + globalconf.config_dir = g_build_filename("/tmp/luakit-devhome/config", globalconf.profile, NULL); + globalconf.data_dir = g_build_filename("/tmp/luakit-devhome/data", globalconf.profile, NULL); + +#else globalconf.cache_dir = g_build_filename(g_get_user_cache_dir(), "luakit", globalconf.profile, NULL); globalconf.config_dir = g_build_filename(g_get_user_config_dir(), "luakit", globalconf.profile, NULL); globalconf.data_dir = g_build_filename(g_get_user_data_dir(), "luakit", globalconf.profile, NULL); +#endif g_mkdir_with_parents(globalconf.cache_dir, 0700); g_mkdir_with_parents(globalconf.config_dir, 0700); g_mkdir_with_parents(globalconf.data_dir, 0700);