X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=src%2Fstrip.vala;h=c425806bf990dcb7fad2575acfc997604c4f765b;hb=5f0816ddc4bde3856a1c5dae80aaacbf62cfeac6;hp=a4c5a6994032b4c003ba8b5dee4fc79c386d884e;hpb=a42613a1384a4aadee86d94f6712525f5f5807c5;p=app.mailtrimmer diff --git a/src/strip.vala b/src/strip.vala index a4c5a69..c425806 100644 --- a/src/strip.vala +++ b/src/strip.vala @@ -754,14 +754,14 @@ public class Strip : GLib.Object { oldest = oldest.add_months(-1 * StripApplication.opt_age_oldest); var rtspan = oldest.difference(oldest) / GLib.TimeSpan.DAY; - if (rtspan > 0) { + if (rtspan < 0) { GLib.debug("skip(2) file is %d days older than %d months", (int)rtspan, StripApplication.opt_age_oldest); return; } var newest = new DateTime.now_local(); newest = newest.add_months(-1 * StripApplication.opt_age_newest); rtspan = mailtime.difference(newest) / GLib.TimeSpan.DAY; - if (rtspan < 0) { + if (rtspan > 0) { GLib.debug("skip(2) file is %d days newer than %d months : %s", (int)rtspan, StripApplication.opt_age_newest, mailtime.format("%Y-%m-%d %H:%M:%S")); return;