** check left to do:
- range scans on maildir
- see how replacing the links works in the resulting email via thunderbird etc..
-
+ - some checksum issues (see dupelicates?? suspect 0byte issues?) -- seems ok now?
var oldest = new DateTime.now_local();
oldest = oldest.add_months(-1 * StripApplication.opt_age_oldest);
- var rtspan = oldest.difference(oldest) / GLib.TimeSpan.DAY;
- GLib.debug("Checking oldest %s days difference", rtspan.to_string() );
+ var rtspan = mailtime.difference(oldest) / GLib.TimeSpan.DAY;
+ GLib.debug("Checking oldest %d days difference", (int)rtspan );
if (rtspan < 0) {
GLib.debug("skip(2) file is %d days older than %d months", (int)rtspan, StripApplication.opt_age_oldest);
return;
Posix.unlink(path +"/" + name);
GLib.debug("copy tmp file %s to %s" , tmpfile, path +"/" + name);
Posix.link(tmpfile, path +"/" + name);
- Posix.unlink(tmpfile);
+
var nf = File.new_for_path(path +"/" + name);
var newfileinfo = nf.query_info(GLib.FileAttribute.TIME_MODIFIED,GLib.FileQueryInfoFlags.NONE,null);
newfileinfo.set_modification_time(mod_time);
nf.set_attributes_from_info(newfileinfo,FileQueryInfoFlags.NONE);
+ Posix.unlink(tmpfile);
}
this.processed++;