diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2014-11-07 09:02:10 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2014-11-07 09:02:10 +0000 |
commit | 656187b01cfcc0f646f9727cdfb81d677e4d5cfc (patch) | |
tree | 90f7840346bfb396e1ab43c37d476de9d0d75e96 /plugins | |
parent | 3a7b275f52e4905cc9b8f4f5c83d5c64c5ec20c1 (diff) |
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
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Db_autobackups/src/backup.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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);
}
|