projects
/
app.mailtrimmer
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
aa5718a
)
src/strip.vala
author
Alan Knowles
<alan@roojs.com>
Thu, 24 May 2018 09:01:23 +0000
(17:01 +0800)
committer
Alan Knowles
<alan@roojs.com>
Thu, 24 May 2018 09:01:23 +0000
(17:01 +0800)
src/strip.vala
patch
|
blob
|
history
diff --git
a/src/strip.vala
b/src/strip.vala
index
2820a0f
..
ed7fee2
100644
(file)
--- a/
src/strip.vala
+++ b/
src/strip.vala
@@
-868,18
+868,22
@@
public class Strip : GLib.Object {
// determine if path is to old to scan..
if (subpath.length > 0 && StripApplication.opt_scan_mailfort) {
var year = int.parse(subpath.substring(1,4)); // "/2000"
// determine if path is to old to scan..
if (subpath.length > 0 && StripApplication.opt_scan_mailfort) {
var year = int.parse(subpath.substring(1,4)); // "/2000"
- var month = subpath.length > 5 ? int.parse(subpath.substring(6,2)) :
0; // "/2000/12"
- var day = subpath.length > 8 ? int.parse(subpath.substring(9,2)) :
0; // "/2000/12/01"
+ var month = subpath.length > 5 ? int.parse(subpath.substring(6,2)) :
999; // "/2000/12"
+ var day = subpath.length > 8 ? int.parse(subpath.substring(9,2)) :
999; // "/2000/12/01"
var oldest = new DateTime.now_local();
oldest = oldest.add_months(-1 * StripApplication.opt_age_oldest);
if (year < oldest.get_year()) {
var oldest = new DateTime.now_local();
oldest = oldest.add_months(-1 * StripApplication.opt_age_oldest);
if (year < oldest.get_year()) {
+ GLib.debug("Skip directory %s is older than min year: %d", subpath, oldest.get_year());
return;
}
if (year == oldest.get_year() && month < oldest.get_month()) {
return;
}
if (year == oldest.get_year() && month < oldest.get_month()) {
+ GLib.debug("Skip directory %s is older than min year: %d/%d", subpath, oldest.get_year() , oldest.get_month() );
+ return;
+ }
+ if (year == oldest.get_year() && month == oldest.get_month() && day < oldest.get_day()) {
return;
}
return;
}
-