From 7fc50cfdc3e7a646e88df8883e205bd78b607e1a Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Wed, 10 Feb 2016 12:43:43 +0000 Subject: ops git-svn-id: http://svn.miranda-ng.org/main/trunk@16262 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Db_autobackups/src/backup.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/Db_autobackups/src/backup.cpp b/plugins/Db_autobackups/src/backup.cpp index e75f886df4..2967b72aa2 100644 --- a/plugins/Db_autobackups/src/backup.cpp +++ b/plugins/Db_autobackups/src/backup.cpp @@ -92,10 +92,11 @@ bool MakeZip_Dir(LPCSTR szDir, LPCTSTR szDest, LPCSTR /* szDbName */, HWND progr const auto& file = it->path(); if (!fs::is_directory(file) && !strstr(file.file_string().c_str(), _T2A(szDest))) { - std::string filepath = file; + std::string filepath = file.file_string(); std::string rpath = filepath.substr(filepath.find(szDir) + mir_strlen(szDir) + 1); HANDLE hSrc; + if (hSrc = CreateFile(_A2T(filepath.c_str()), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL)) { if (zipOpenNewFileInZip(hZip, rpath.c_str(), &fi, NULL, 0, NULL, 0, "", Z_DEFLATED, Z_BEST_COMPRESSION) == ZIP_OK) -- cgit v1.2.3