]> git.ipfire.org Git - location/libloc.git/commitdiff
lua: Export default database path
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 22 Feb 2024 16:16:53 +0000 (16:16 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 22 Feb 2024 16:16:53 +0000 (16:16 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/lua/location.c

index 48466f6d00796f0fb8bcaa676987109e95fb29c5..727482f2096abdfd443887ed92b074e9314f26f3 100644 (file)
@@ -73,5 +73,9 @@ int luaopen_location(lua_State* L) {
 
        lua_setfield(L, -2, "Network");
 
+       // Set DATABASE_PATH
+       lua_pushstring(L, LIBLOC_DEFAULT_DATABASE_PATH);
+       lua_setfield(L, -2, "DATABASE_PATH");
+
        return 1;
 }