#define _XOPEN_SOURCE
+#include "glua.h"
+
#include <cstdio>
#include <cstring>
#include <ctime>
#include <glib.h>
#include <lua.hpp>
+#include "debug.h"
+#include "exif.h"
+#include "filedata.h"
+#include "main-defines.h"
#include "main.h"
-#include "glua.h"
#include "ui-fileops.h"
-#include "exif.h"
/**
* @file
lua_pushnumber(L, datetime);
return 1;
}
- else
- {
- lua_pushnil(L);
- return 1;
- }
+
+ lua_pushnil(L);
+ return 1;
}
- else if (strcmp(key, "Exif.Photo.DateTimeDigitized") == 0)
+
+ if (strcmp(key, "Exif.Photo.DateTimeDigitized") == 0)
{
memset(&tm, 0, sizeof(tm));
if (value && strptime(value, "%Y:%m:%d %H:%M:%S", &tm))
lua_pushnumber(L, datetime);
return 1;
}
- else
- {
- lua_pushnil(L);
- return 1;
- }
+
+ lua_pushnil(L);
+ return 1;
}
lua_pushstring(L, value);
return 1;
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("");