summaryrefslogtreecommitdiff
path: root/plugins/Db_autobackups
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-06-20 19:20:31 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-06-20 19:20:31 +0300
commit1444743f2a88a2e9971d44b93f9bba98bfd2a5c9 (patch)
tree2a1d44f021d56e06b69015c9a83d75e0b03ab8a7 /plugins/Db_autobackups
parent2079a83c7b01c68be4276d8c89d1a7967d07c3f9 (diff)
mad ANSI <-> Unicode conversion removed
Diffstat (limited to 'plugins/Db_autobackups')
-rw-r--r--plugins/Db_autobackups/src/backup.cpp4
-rw-r--r--plugins/Db_autobackups/src/stdafx.h2
-rw-r--r--plugins/Db_autobackups/src/zip.cpp4
3 files changed, 5 insertions, 5 deletions
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<ZipFile> 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<ZipFile> &lstFiles, const std::function<bool(size_t)> &fnCallback);
+int CreateZipFile(const wchar_t *szDestPath, OBJLIST<ZipFile> &lstFiles, const std::function<bool(size_t)> &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<ZipFile> &lstFiles, const std::function<bool(size_t)> &fnCallback)
+int CreateZipFile(const wchar_t *szDestPath, OBJLIST<ZipFile> &lstFiles, const std::function<bool(size_t)> &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 };