From: Alan Knowles Date: Fri, 29 Jun 2018 07:31:31 +0000 (+0800) Subject: src/strip.vala X-Git-Url: http://git.roojs.org/?p=app.mailtrimmer;a=commitdiff_plain;h=a2db8e4179462b4110f2550d405ee952ec2e6aad src/strip.vala --- 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(