From 1444743f2a88a2e9971d44b93f9bba98bfd2a5c9 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 20 Jun 2018 19:20:31 +0300 Subject: mad ANSI <-> Unicode conversion removed --- plugins/Db_autobackups/src/backup.cpp | 4 ++-- plugins/Db_autobackups/src/stdafx.h | 2 +- plugins/Db_autobackups/src/zip.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins') diff --git a/plugins/Db_autobackups/src/backup.cpp b/plugins/Db_autobackups/src/backup.cpp index e27e9ff610..e502929937 100644 --- a/plugins/Db_autobackups/src/backup.cpp +++ b/plugins/Db_autobackups/src/backup.cpp @@ -97,7 +97,7 @@ bool MakeZip_Dir(LPCSTR szDir, LPCTSTR szDest, LPCSTR /* szDbName */, HWND progr if (count == 0) return 1; - CreateZipFile(_T2A(szDest), lstFiles, [&](size_t i)->bool { + CreateZipFile(szDest, lstFiles, [&](size_t i)->bool { SendMessage(hProgBar, PBM_SETPOS, (WPARAM)(100 * i / count), 0); return GetWindowLongPtr(progress_dialog, GWLP_USERDATA) != 1; }); @@ -114,7 +114,7 @@ bool MakeZip(wchar_t *tszSource, wchar_t *tszDest, wchar_t *dbname, HWND progres OBJLIST lstFiles(15); lstFiles.insert(new ZipFile((char*)_T2A(tszSource), (char*)szSourceName)); - CreateZipFile(_T2A(tszDest), lstFiles, [&](size_t)->bool { SendMessage(hProgBar, PBM_SETPOS, (WPARAM)(100), 0); return true; }); + CreateZipFile(tszDest, lstFiles, [&](size_t)->bool { SendMessage(hProgBar, PBM_SETPOS, (WPARAM)(100), 0); return true; }); return true; } diff --git a/plugins/Db_autobackups/src/stdafx.h b/plugins/Db_autobackups/src/stdafx.h index 0698f1fd47..c680d2b673 100644 --- a/plugins/Db_autobackups/src/stdafx.h +++ b/plugins/Db_autobackups/src/stdafx.h @@ -55,7 +55,7 @@ struct ZipFile __forceinline ZipFile(const std::string &path, const std::string &zpath) : sPath(path), sZipPath(zpath) {} }; -int CreateZipFile(const char *szDestPath, OBJLIST &lstFiles, const std::function &fnCallback); +int CreateZipFile(const wchar_t *szDestPath, OBJLIST &lstFiles, const std::function &fnCallback); extern char g_szMirVer[]; diff --git a/plugins/Db_autobackups/src/zip.cpp b/plugins/Db_autobackups/src/zip.cpp index c0c7e08c43..96d74e7493 100644 --- a/plugins/Db_autobackups/src/zip.cpp +++ b/plugins/Db_autobackups/src/zip.cpp @@ -1,9 +1,9 @@ #include "stdafx.h" #include "../../libs/zlib/src/zip.h" -int CreateZipFile(const char *szDestPath, OBJLIST &lstFiles, const std::function &fnCallback) +int CreateZipFile(const wchar_t *szDestPath, OBJLIST &lstFiles, const std::function &fnCallback) { - zipFile hZip = zipOpen2_64(_A2T(szDestPath), APPEND_STATUS_CREATE, nullptr, nullptr); + zipFile hZip = zipOpen2_64(szDestPath, APPEND_STATUS_CREATE, nullptr, nullptr); if (!hZip) return 1; zip_fileinfo fi = { 0 }; -- cgit v1.2.3