FIXME: lua - what is the correct way to find the scripts folder
authorColin Clark <colin.clark@cclark.uk>
Sun, 22 Oct 2023 09:03:46 +0000 (10:03 +0100)
committerColin Clark <colin.clark@cclark.uk>
Sun, 22 Oct 2023 09:03:46 +0000 (10:03 +0100)
src/lua.cc

index 059b285..b03b048 100644 (file)
@@ -361,8 +361,7 @@ gchar *lua_callvalue(FileData *fd, const gchar *file, const gchar *function)
        std::unique_ptr<gchar, decltype(&g_free)> path{g_build_filename(get_rc_dir(), "lua", file, NULL), g_free};
        if (access(path.get(), R_OK) == -1)
                {
-               /** @FIXME what is the correct way to find the scripts folder? */
-               path.reset(g_build_filename("/usr/local/lib", GQ_APPNAME_LC, file, NULL));
+               path.reset(g_build_filename(gq_bindir, file, NULL));
                if (access(path.get(), R_OK) == -1)
                        {
                        return g_strdup("");