From e382b9d89cb1cc9e07b102f6a7db4f866a311d11 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Fri, 4 Mar 2016 14:22:29 +0000 Subject: DB_autobackups: dropbox support reworked git-svn-id: http://svn.miranda-ng.org/main/trunk@16415 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Db_autobackups/src/backup.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'plugins/Db_autobackups/src/backup.cpp') diff --git a/plugins/Db_autobackups/src/backup.cpp b/plugins/Db_autobackups/src/backup.cpp index b83a4f527e..18fd521c14 100644 --- a/plugins/Db_autobackups/src/backup.cpp +++ b/plugins/Db_autobackups/src/backup.cpp @@ -58,6 +58,7 @@ INT_PTR CALLBACK DlgProcProgress(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM) } return FALSE; } + TCHAR* DoubleSlash(TCHAR *sorce) { TCHAR *ret, *r, *s; @@ -318,7 +319,10 @@ int Backup(TCHAR *backup_filename) if (options.use_dropbox) { - CallService(MS_DROPBOX_SEND_FILE, NULL, (LPARAM)&dest_file); + CMString s_path(FORMAT, L"/Backups/%s", _tcsrchr(dest_file, '\\') + 1); + DropboxUploadInfo dui = { dest_file, s_path.GetString() }; + if (CallService(MS_DROPBOX_UPLOAD, NULL, (LPARAM)&dui)) + ShowPopup(TranslateT("Uploading to Dropbox failed"), TranslateT("Error"), nullptr); } if (!options.disable_popups) { -- cgit v1.2.3