From 35ac3e476de39bc50269b9aa178c67e0fc18f3f6 Mon Sep 17 00:00:00 2001
From: MikalaiR <nikolay.romanovich@narod.ru>
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 +++---
 plugins/Db_autobackups/src/stdafx.h   | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

(limited to 'plugins')

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++;
diff --git a/plugins/Db_autobackups/src/stdafx.h b/plugins/Db_autobackups/src/stdafx.h
index 77dd225a59..e604d7f886 100644
--- a/plugins/Db_autobackups/src/stdafx.h
+++ b/plugins/Db_autobackups/src/stdafx.h
@@ -12,8 +12,8 @@
 #	include <filesystem>
 	namespace fs = std::tr2::sys;
 #else
-#	include <experimental/filesystem>
-	namespace fs = std::experimental::filesystem;
+#	include <boost/filesystem.hpp>
+	namespace fs = boost::filesystem;
 #endif
 
 #include <newpluginapi.h>
-- 
cgit v1.2.3