Fixed edge case

pull/147/head
M66B 6 years ago
parent c29cebf18c
commit 957f2be75e

@ -2056,6 +2056,9 @@ public class ServiceSynchronize extends LifecycleService {
int keep_days = jargs.getInt(1);
boolean download = jargs.getBoolean(2);
if (keep_days == sync_days)
keep_days++;
Log.i(folder.name + " start sync after=" + sync_days + "/" + keep_days);
db.folder().setFolderSyncState(folder.id, "syncing");
@ -2070,7 +2073,7 @@ public class ServiceSynchronize extends LifecycleService {
Calendar cal_keep = Calendar.getInstance();
cal_keep.add(Calendar.DAY_OF_MONTH, -keep_days);
cal_keep.set(Calendar.HOUR_OF_DAY, 12);
cal_keep.set(Calendar.HOUR_OF_DAY, 0);
cal_keep.set(Calendar.MINUTE, 0);
cal_keep.set(Calendar.SECOND, 0);
cal_keep.set(Calendar.MILLISECOND, 0);

Loading…
Cancel
Save