From a2db8e4179462b4110f2550d405ee952ec2e6aad Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Fri, 29 Jun 2018 15:31:31 +0800 Subject: [PATCH] src/strip.vala --- src/strip.vala | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/strip.vala b/src/strip.vala index c3fd8fc..5b55d52 100644 --- a/src/strip.vala +++ b/src/strip.vala @@ -368,6 +368,17 @@ public class Strip : GLib.Object { return; } + // initialize it with known data.. + // that should wipe out dupes. + var matches = this.execute("SELECT count(id) FROM Attachment WHERE id = %d".printf( + int.parse(sid))); + + if (matches=="0") { + GLib.error("Failed to find id :%s", sid); + return; + } + + // initialize it with known data.. // that should wipe out dupes. var filesize = this.execute("SELECT filesize FROM Attachment WHERE id = %d".printf( -- 2.39.2