From 656187b01cfcc0f646f9727cdfb81d677e4d5cfc Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Fri, 7 Nov 2014 09:02:10 +0000 Subject: fix for creating backup first time without timestamp in database git-svn-id: http://svn.miranda-ng.org/main/trunk@10921 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Db_autobackups/src/backup.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Db_autobackups/src/backup.cpp b/plugins/Db_autobackups/src/backup.cpp index aa7499131e..7627dae3ed 100644 --- a/plugins/Db_autobackups/src/backup.cpp +++ b/plugins/Db_autobackups/src/backup.cpp @@ -301,7 +301,7 @@ int Backup(TCHAR* backup_filename) VOID CALLBACK TimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) { time_t t = time(NULL); - time_t diff = t - (time_t)db_get_dw(0, "AutoBackups", "LastBackupTimestamp", (DWORD)t); + time_t diff = t - (time_t)db_get_dw(0, "AutoBackups", "LastBackupTimestamp", 0); if (diff > (time_t)(options.period * (options.period_type == PT_MINUTES ? 60 : (options.period_type == PT_HOURS ? 60 * 60 : 60 * 60 * 24 )))) mir_forkthread(BackupThread, NULL); } -- cgit v1.2.3