Fixed: Scheduled backup is skipped if last snapshot date is few seconds more than the cutoff date

This commit is contained in:
Tony George 2013-10-08 21:33:42 +05:30
parent d18877ce29
commit 2ff7eaf01b
4 changed files with 5 additions and 7 deletions

2
debian/changelog vendored
View File

@ -1,7 +1,5 @@
timeshift (1.0.4) quantal; urgency=low
* Rev:1, 2013-10-05
* Initial Release
-- Tony George <tony.george.kol@gmail.com> Sat, 05 Oct 2013 10:00:00 +0530

View File

@ -578,7 +578,7 @@ public class Main : GLib.Object{
log_msg(_("Last hourly snapshot not found"));
take_new = true;
}
else if (last_snapshot_hourly.date.compare(now.add_hours(-1)) < 0){
else if (last_snapshot_hourly.date.compare(now.add_hours(-1).add_minutes(1)) < 0){
log_msg(_("Last hourly snapshot is more than 1 hour old"));
take_new = true;
}
@ -610,7 +610,7 @@ public class Main : GLib.Object{
log_msg(_("Last daily snapshot not found"));
take_new = true;
}
else if (last_snapshot_daily.date.compare(now.add_days(-1)) < 0){
else if (last_snapshot_daily.date.compare(now.add_days(-1).add_minutes(1)) < 0){
log_msg(_("Last daily snapshot is more than 1 day old"));
take_new = true;
}
@ -642,7 +642,7 @@ public class Main : GLib.Object{
log_msg(_("Last weekly snapshot not found"));
take_new = true;
}
else if (last_snapshot_weekly.date.compare(now.add_weeks(-1)) < 0){
else if (last_snapshot_weekly.date.compare(now.add_weeks(-1).add_minutes(1)) < 0){
log_msg(_("Last weekly snapshot is more than 1 week old"));
take_new = true;
}
@ -674,7 +674,7 @@ public class Main : GLib.Object{
log_msg(_("Last monthly snapshot not found"));
take_new = true;
}
else if (last_snapshot_monthly.date.compare(now.add_months(-1)) < 0){
else if (last_snapshot_monthly.date.compare(now.add_months(-1).add_minutes(1)) < 0){
log_msg(_("Last monthly snapshot is more than 1 month old"));
take_new = true;
}

Binary file not shown.

View File

@ -18,7 +18,7 @@ long_line_column=80
[files]
current_page=7
FILE_NAME_0=2723;Vala;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fsrc%2FMain.vala;0;4
FILE_NAME_0=10274;Vala;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fsrc%2FMain.vala;0;4
FILE_NAME_1=15114;Vala;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fsrc%2FMainWindow.vala;0;4
FILE_NAME_2=7729;Vala;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fsrc%2FSettingsWindow.vala;0;4
FILE_NAME_3=14998;Vala;0;16;1;1;0;%2Fhome%2Fteejee%2Fprojects%2Ftimeshift%2Fsrc%2FRestoreWindow.vala;0;4