Evas filters: Fix crazy code (only when DEBUG=1)

This commit is contained in:
Jean-Philippe Andre 2016-01-04 14:20:17 +09:00
parent 13d9f7ebcd
commit 61fcf8e497
1 changed files with 14 additions and 17 deletions

View File

@ -2253,13 +2253,11 @@ _lua_import_path_get(char *path, size_t len, const char *name)
size_t r;
#ifdef FILTERS_DEBUG
struct stat st;
// This is a hack to fetch the most recent file from source
if (stat(path, &st) == -1)
{
char *sep = evas_file_path_join("", "");
char *src = strdup(__FILE__);
char *slash = strrchr(src, *sep);
struct stat st;
if (slash)
{
*slash = '\0';
@ -2272,7 +2270,6 @@ _lua_import_path_get(char *path, size_t len, const char *name)
free(sep);
free(src);
if (!stat(path, &st)) return;
}
#endif
r = snprintf(path, len - 1, "%s/filters/lua/%s.lua", pfx ? pfx : ".", name);