From 6d62a0448bae60216b3cb0490ee48fe8d408f6b8 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Fri, 29 Jun 2018 16:33:31 +0800 Subject: [PATCH] src/strip.vala --- src/strip.vala | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/strip.vala b/src/strip.vala index 60f7a70..ca947c0 100644 --- a/src/strip.vala +++ b/src/strip.vala @@ -444,6 +444,13 @@ public class Strip : GLib.Object { var filename = attachment.get_header("X-strip-content-name"); var file_path = attachment.get_header("X-strip-path"); var fn = StripApplication.opt_target_path + "/" + file_path; + + + if (!FileUtils.test (fn, FileTest.EXISTS)) { + GLib.debug("SKIP -- file does not exist"); + return; + } + var chksum = this.md5_file(fn); var mime_type = attachment.get_header("X-strip-content-type"); @@ -452,9 +459,6 @@ public class Strip : GLib.Object { ,GLib.FileQueryInfoFlags.NONE,null); var file_size = (int) fileinfo.get_size(); - if (!FileUtils.test (fn, FileTest.EXISTS)) { - GLib.debug("SKIP -- file does not exist"); - } this.real_query(-1, """ -- 2.39.2