diff options
Diffstat (limited to 'plugins/Db_autobackups')
-rw-r--r-- | plugins/Db_autobackups/src/backup.cpp | 3 | ||||
-rw-r--r-- | plugins/Db_autobackups/src/options.cpp | 4 | ||||
-rw-r--r-- | plugins/Db_autobackups/src/options.h | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/plugins/Db_autobackups/src/backup.cpp b/plugins/Db_autobackups/src/backup.cpp index d18693c2f0..b63690ac72 100644 --- a/plugins/Db_autobackups/src/backup.cpp +++ b/plugins/Db_autobackups/src/backup.cpp @@ -174,7 +174,6 @@ int Comp(const void *i, const void *j) int RotateBackups(TCHAR *backupfolder, TCHAR *dbname)
{
- size_t i = 0;
backupFile *bf = NULL, *bftmp;
HANDLE hFind;
TCHAR backupfolderTmp[MAX_PATH];
@@ -186,6 +185,8 @@ int RotateBackups(TCHAR *backupfolder, TCHAR *dbname) hFind = FindFirstFile(backupfolderTmp, &FindFileData);
if (hFind == INVALID_HANDLE_VALUE)
return 0;
+
+ int i = 0;
do {
if (FindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
continue;
diff --git a/plugins/Db_autobackups/src/options.cpp b/plugins/Db_autobackups/src/options.cpp index f274d346de..d02bb47032 100644 --- a/plugins/Db_autobackups/src/options.cpp +++ b/plugins/Db_autobackups/src/options.cpp @@ -56,7 +56,7 @@ int LoadOptions(void) else
mir_sntprintf(options.folder, SIZEOF(options.folder), _T("%s%s"), DIR, SUB_DIR);
}
- options.num_backups = (unsigned int)db_get_w(0, "AutoBackups", "NumBackups", 3);
+ options.num_backups = db_get_w(0, "AutoBackups", "NumBackups", 3);
options.disable_progress = (BOOL)db_get_b(0, "AutoBackups", "NoProgress", 0);
options.disable_popups = (BOOL)db_get_b(0, "AutoBackups", "NoPopups", 0);
@@ -92,7 +92,7 @@ int SaveOptions(void) mir_sntprintf(options.folder, SIZEOF(options.folder), _T("%s\\%s"), profilePath, prof_dir);
}
mir_free(tmp);
- db_set_w(0, "AutoBackups", "NumBackups", (WORD)options.num_backups);
+ db_set_w(0, "AutoBackups", "NumBackups", options.num_backups);
db_set_b(0, "AutoBackups", "NoProgress", (BYTE)options.disable_progress);
db_set_b(0, "AutoBackups", "NoPopups", (BYTE)options.disable_popups);
db_set_b(0, "AutoBackups", "UseZip", (BYTE)options.use_zip);
diff --git a/plugins/Db_autobackups/src/options.h b/plugins/Db_autobackups/src/options.h index d497912330..1b1a94938a 100644 --- a/plugins/Db_autobackups/src/options.h +++ b/plugins/Db_autobackups/src/options.h @@ -30,7 +30,7 @@ typedef struct Options_tag { unsigned int period;
PeriodType period_type;
TCHAR folder[MAX_PATH];
- size_t num_backups;
+ int num_backups;
BOOL disable_progress;
BOOL disable_popups;
BOOL use_zip;
|