Add the keep 0 days feature.

This commit is contained in:
lishuang
2021-01-02 17:10:49 +08:00
parent e1e46457e7
commit 847bcd746c
3 changed files with 13 additions and 2 deletions

View File

@ -1303,7 +1303,9 @@ func (this *MatterService) CleanExpiredDeletedMatters() {
thenDate := time.Now()
thenDate = thenDate.AddDate(0, 0, int(-preference.DeletedKeepDays))
thenDate = util.FirstSecondOfDay(thenDate)
if preference.DeletedKeepDays != 0 {
thenDate = util.FirstSecondOfDay(thenDate)
}
//first remove all the matter(not dir).
this.matterDao.PageHandle("", "", "", FALSE, TRUE, &thenDate, nil, func(matter *Matter) {