summaryrefslogtreecommitdiff
path: root/plugins/Db_autobackups/src/zip.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-06-20 19:38:11 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-06-20 19:38:11 +0300
commit3b33d7fd43c99e7408392f43b7c02f10673b2923 (patch)
treedf90f9dc7df9a262a0899a2e69aecaf14d02b3c6 /plugins/Db_autobackups/src/zip.cpp
parent1444743f2a88a2e9971d44b93f9bba98bfd2a5c9 (diff)
even less crazy ANSI <-> Unicode conversions
Diffstat (limited to 'plugins/Db_autobackups/src/zip.cpp')
-rw-r--r--plugins/Db_autobackups/src/zip.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/Db_autobackups/src/zip.cpp b/plugins/Db_autobackups/src/zip.cpp
index 96d74e7493..b360272855 100644
--- a/plugins/Db_autobackups/src/zip.cpp
+++ b/plugins/Db_autobackups/src/zip.cpp
@@ -12,9 +12,9 @@ int CreateZipFile(const wchar_t *szDestPath, OBJLIST<ZipFile> &lstFiles, const s
for (int i = 0; i < lstFiles.getCount(); i++) {
ZipFile &zf = lstFiles[i];
- HANDLE hSrcFile = CreateFileA(zf.sPath.c_str(), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
+ HANDLE hSrcFile = CreateFileW(zf.sPath.c_str(), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
if (hSrcFile != INVALID_HANDLE_VALUE) {
- int iOpenRes = zipOpenNewFileInZip(hZip, zf.sZipPath.c_str(), &fi, nullptr, 0, nullptr, 0, "", Z_DEFLATED, Z_BEST_COMPRESSION);
+ int iOpenRes = zipOpenNewFileInZip(hZip, _T2A(zf.sZipPath.c_str()), &fi, nullptr, 0, nullptr, 0, "", Z_DEFLATED, Z_BEST_COMPRESSION);
if (iOpenRes == ZIP_OK) {
DWORD dwRead;