src/strip.vala
authorAlan Knowles <alan@roojs.com>
Fri, 29 Jun 2018 08:33:31 +0000 (16:33 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 29 Jun 2018 08:33:31 +0000 (16:33 +0800)
src/strip.vala

index 60f7a70..ca947c0 100644 (file)
@@ -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, """