summaryrefslogtreecommitdiff
path: root/db3x_autobackups/backup.c
diff options
context:
space:
mode:
Diffstat (limited to 'db3x_autobackups/backup.c')
-rw-r--r--db3x_autobackups/backup.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/db3x_autobackups/backup.c b/db3x_autobackups/backup.c
index 43ef4fb..da8d9d5 100644
--- a/db3x_autobackups/backup.c
+++ b/db3x_autobackups/backup.c
@@ -76,7 +76,7 @@ int RotateBackups(HWND progress_dialog, DWORD start_time) {
itoa(options.num_backups - 1, num1, 10);
strcat(backupfilename1, num1);
strcat(backupfilename1, ".dat");
- DeleteFile(backupfilename1);
+ DeleteFileA(backupfilename1);
for(i = options.num_backups - 1; i > 0 && GetWindowLong(progress_dialog, GWL_USERDATA) == 0; i--) {
strcpy(backupfilename1, options.folder);
@@ -91,7 +91,7 @@ int RotateBackups(HWND progress_dialog, DWORD start_time) {
strcat(backupfilename2, num2);
strcat(backupfilename2, ".dat");
- MoveFile(backupfilename1, backupfilename2);
+ MoveFileA(backupfilename1, backupfilename2);
if(GetTickCount() - start_time >= SHOW_PROGRESS_TIME)
ShowWindow(progress_dialog, SW_SHOW);
@@ -122,7 +122,7 @@ int Backup() {
DWORD start_time = GetTickCount();
// ensure the backup folder exists (either create it or return non-zero signifying error)
- if(!CreateDirectory(options.folder, 0)) {
+ if(!CreateDirectoryA(options.folder, 0)) {
DWORD err = GetLastError();
if(err != ERROR_ALREADY_EXISTS) {
return 1;
@@ -132,7 +132,7 @@ int Backup() {
if(!options.disable_progress) {
progress_dialog = CreateDialog(g_hInst, MAKEINTRESOURCE(IDD_COPYPROGRESS), 0, DlgProcProgress);
prog = GetDlgItem(progress_dialog, IDC_PROGRESS);
- SetDlgItemText(progress_dialog, IDC_PROGRESSMESSAGE, Translate("Rotating backup files..."));
+ SetDlgItemText(progress_dialog, IDC_PROGRESSMESSAGE, TranslateT("Rotating backup files..."));
}
@@ -141,11 +141,11 @@ int Backup() {
strcpy(backup_filename, options.folder);
strcat(backup_filename, "\\db_backup0.dat");
- hBackupFile = CreateFile(backup_filename, GENERIC_WRITE, FILE_SHARE_WRITE, 0, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
+ hBackupFile = CreateFileA(backup_filename, GENERIC_WRITE, FILE_SHARE_WRITE, 0, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
if(hBackupFile != INVALID_HANDLE_VALUE) {
if(!options.disable_progress) {
- SetDlgItemText(progress_dialog, IDC_PROGRESSMESSAGE, Translate("Copying database file..."));
+ SetDlgItemText(progress_dialog, IDC_PROGRESSMESSAGE, TranslateT("Copying database file..."));
SendMessage(prog, PBM_SETPOS, (WPARAM)(int)(0), 0);
UpdateWindow(progress_dialog);
}
@@ -201,7 +201,7 @@ int Backup() {
CloseHandle(hBackupFile);
if(!options.disable_progress && GetWindowLong(progress_dialog, GWL_USERDATA) != 0)
- DeleteFile(backup_filename);
+ DeleteFileA(backup_filename);
else
DBWriteContactSettingDword(0, "db3x", "LastBackupTimestamp", (DWORD)time(0));