summaryrefslogtreecommitdiff
path: root/plugins/Db_autobackups/src
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2016-02-10 12:43:43 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2016-02-10 12:43:43 +0000
commit7fc50cfdc3e7a646e88df8883e205bd78b607e1a (patch)
treeac40086dbccb6ea49e9cd4e9ffd8263c6923648f /plugins/Db_autobackups/src
parent4b52020304f2a193a32f031624c89c58e03f5d1d (diff)
ops
git-svn-id: http://svn.miranda-ng.org/main/trunk@16262 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Db_autobackups/src')
-rw-r--r--plugins/Db_autobackups/src/backup.cpp3
1 files changed, 2 insertions, 1 deletions
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)