From 23d0a2244aa712ca33aa4ea9655298c095b8f0ba Mon Sep 17 00:00:00 2001 From: Timo Teräs Date: Wed, 8 Apr 2015 11:08:16 +0300 Subject: ignore .apk-new files for overlays --- src/blob.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/blob.c') diff --git a/src/blob.c b/src/blob.c index f1fe221..007a0cd 100644 --- a/src/blob.c +++ b/src/blob.c @@ -225,6 +225,12 @@ int apk_blob_compare(apk_blob_t a, apk_blob_t b) return 1; } +int apk_blob_ends_with(apk_blob_t a, apk_blob_t b) +{ + if (a.len < b.len) return 0; + return memcmp(a.ptr+a.len-b.len, b.ptr, b.len) == 0; +} + int apk_blob_for_each_segment(apk_blob_t blob, const char *split, int (*cb)(void *ctx, apk_blob_t blob), void *ctx) { -- cgit v1.2.3-70-g09d2