src/strip.vala
authorAlan Knowles <alan@roojs.com>
Wed, 9 May 2018 09:06:59 +0000 (17:06 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 9 May 2018 09:06:59 +0000 (17:06 +0800)
src/strip.vala

index 71351d6..74d1ad1 100644 (file)
@@ -648,7 +648,7 @@ public class Strip : GLib.Object {
        this.active_name = name;
        this.active_message_id = "";
 
-               DateTime mailtime;
+               DateTime mailtime = new DateTime.local();
                if (StripApplication.opt_scan_mailfort) {
                    this.created_dir = this.active_path.substring(this.base_dir.length + 1 );
                        this.created_date = this.created_dir.replace("/", "-");
@@ -739,10 +739,10 @@ public class Strip : GLib.Object {
                
                var oldest = new  DateTime.now_local();
                oldest.add_months(-1 * StripApplication.opt_min_age);
-               var tspan = mailtime.difference(oldest) / GLib.TimeSpan.DAY;
+               var rtspan = mailtime.difference(oldest) / GLib.TimeSpan.DAY;
 
-               if (tspan < 0) {
-                       GLib.debug("skip file is %d days older than %d months", (int)tspan, StripApplication.opt_min_age);
+               if (rtspan < 0) {
+                       GLib.debug("skip file is %d days older than %d months", (int)rtspan, StripApplication.opt_min_age);
                        return;
                }