Sybil: Fix retention of old analysis files when configured to never delete

This commit is contained in:
zzz
2021-05-10 08:38:35 -04:00
parent 57f1ac43ad
commit ea7183eeda

View File

@@ -196,6 +196,9 @@ public class PersistSybil {
removeTime = Analysis.DEFAULT_REMOVE_TIME;
}
long age = _context.getProperty(Analysis.PROP_REMOVETIME, removeTime);
// 0 means never delete
if (age <= 0)
return;
long freq2 = 2 * _context.getProperty(Analysis.PROP_FREQUENCY, Analysis.DEFAULT_FREQUENCY);
if (age < freq2)
age = freq2;