From 35ac3e476de39bc50269b9aa178c67e0fc18f3f6 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Wed, 10 Feb 2016 13:57:41 +0000 Subject: db_autobackups: VS2010 compilation fix (using boost for VS2010) git-svn-id: http://svn.miranda-ng.org/main/trunk@16264 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Db_autobackups/src/backup.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/Db_autobackups/src/backup.cpp') diff --git a/plugins/Db_autobackups/src/backup.cpp b/plugins/Db_autobackups/src/backup.cpp index 7d715ec7d6..59fa134b99 100644 --- a/plugins/Db_autobackups/src/backup.cpp +++ b/plugins/Db_autobackups/src/backup.cpp @@ -90,9 +90,9 @@ bool MakeZip_Dir(LPCSTR szDir, LPCTSTR szDest, LPCSTR /* szDbName */, HWND progr for (auto it = fs::recursive_directory_iterator(fs::path(szDir)); it != fs::recursive_directory_iterator(); ++it) { const auto& file = it->path(); - if (!fs::is_directory(file) && !strstr(file.file_string().c_str(), _T2A(szDest))) + if (!fs::is_directory(file) && !strstr((LPCSTR)file.string().c_str(), _T2A(szDest))) { - const std::string &filepath = file.file_string(); + const std::string &filepath = file.string(); const std::string rpath = filepath.substr(filepath.find(szDir) + mir_strlen(szDir) + 1); HANDLE hSrc; @@ -103,7 +103,7 @@ bool MakeZip_Dir(LPCSTR szDir, LPCTSTR szDest, LPCSTR /* szDbName */, HWND progr { DWORD dwRead; uint8_t buf[(256 * 1024)]; - while (ReadFile(hSrc, buf, sizeof(buf), &dwRead, nullptr) && dwRead && !zipWriteInFileInZip(hZip, buf, dwRead)); + while (ReadFile(hSrc, buf, sizeof(buf), &dwRead, nullptr) && dwRead && (zipWriteInFileInZip(hZip, buf, dwRead) == ZIP_OK)); zipCloseFileInZip(hZip); } i++; -- cgit v1.2.3