|
|
|
@ -7,6 +7,7 @@ |
|
|
|
|
#include "run_test.h" |
|
|
|
|
#include "list_file.h" |
|
|
|
|
#include "exactness_config.h" |
|
|
|
|
#include "exactness_private.h" |
|
|
|
|
|
|
|
|
|
#define LIBEXACTNESS_PATH PACKAGE_LIBDIR "/exactness/libexactness.so" |
|
|
|
|
|
|
|
|
@ -117,12 +118,18 @@ _is_equal(const char *filename1, const char *filename2) |
|
|
|
|
return !memcmp(res1, res2, _DIGEST_SIZE); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static Eina_Bool |
|
|
|
|
_check_prefix(const char *prefix, const char *name) |
|
|
|
|
{ |
|
|
|
|
unsigned int len = strlen(prefix); |
|
|
|
|
return (!strncmp(name, prefix, len) && (strlen(name) > len) && (name[len] == SHOT_DELIMITER)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void |
|
|
|
|
_compare_list_cb(const char *name, const char *path EINA_UNUSED, void *data) |
|
|
|
|
{ |
|
|
|
|
const char *prefix = data; |
|
|
|
|
unsigned int len = strlen(prefix); |
|
|
|
|
if (!strncmp(name, prefix, len) && (strlen(name) > len) && (name[len] == '+')) |
|
|
|
|
if (_check_prefix(prefix, name)) |
|
|
|
|
{ |
|
|
|
|
char filename1[EXACTNESS_PATH_MAX], filename2[EXACTNESS_PATH_MAX]; |
|
|
|
|
snprintf(filename1, EXACTNESS_PATH_MAX, "%s/%s/%s", exactness_config.dest_dir, CURRENT_SUBDIR, name); |
|
|
|
@ -160,7 +167,7 @@ static void |
|
|
|
|
_prefix_rm_cb(const char *name, const char *path, void *data) |
|
|
|
|
{ |
|
|
|
|
const char *prefix = data; |
|
|
|
|
if (!strncmp(name, prefix, strlen(prefix))) |
|
|
|
|
if (_check_prefix(prefix, name)) |
|
|
|
|
{ |
|
|
|
|
char buf[EXACTNESS_PATH_MAX]; |
|
|
|
|
snprintf(buf, EXACTNESS_PATH_MAX, "%s/%s", path, name); |
|
|
|
|