From 4a62859973077f8455e233a078efc23c90bc5e31 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Fri, 4 May 2018 13:28:13 +0800 Subject: [PATCH] src/strip.vala --- src/strip.vala | 46 +++++++++++++--------------------------------- 1 file changed, 13 insertions(+), 33 deletions(-) diff --git a/src/strip.vala b/src/strip.vala index 7653fff..c998354 100644 --- a/src/strip.vala +++ b/src/strip.vala @@ -445,48 +445,28 @@ public class Strip : GLib.Object { return; } - file_id = row[0]; - //create_dir = row[1]; - //GLib.debug("msgid %s", row[2]); - - this.used_space_after += file_size; - if (StripApplication.opt_is_extracting) { - target_fn = StripApplication.opt_target_path + "/" + this.created_dir +"/"+ file_id + "-" + filename; - } + file_id = row[0]; - } else { + + GLib.debug("fn = %s, m5=%s, id= %s", filename, mime_type, this.active_message_id); + this.query(""" - GLib.debug("fn = %s, m5=%s, id= %s", filename, mime_type, this.active_message_id); - this.query(""" - SELECT attachment_update( %d, -- in_id INT(11), '%s', -- in_mime_type varchar(255), - %d, -- in_mime_size int(11), - '%s', --in_created DATETIME, + '%s', -- in_created DATETIME, '%s', -- in_mailfort_sig varchar(64) ) as result - """.printf( - - this.mysql_escape(this.active_message_exim_id), this.mysql_escape(this.active_message_x_mailfort_sig), - "", - "attachment", - file_size, - - this.mysql_escape(this.active_message_exim_id), // msgid ? - this.mysql_escape(this.active_message_exim_id), this.mysql_escape(this.active_message_x_mailfort_sig), // maillog_id - this.created_date, // delivered (from lookup) - - chksum, - file_size, - "", // filled in after we find out the id.. - - this.created_date, - this.mysql_escape(filename), - this.mysql_escape(mime_type) - + """.printf( + int.parse(file_id), + this.mysql_escape(mime_type), + this.created_date + this.mysql_escape(this.active_message_x_mailfort_sig) + )); + + -- 2.39.2