diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2016-02-10 13:57:41 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2016-02-10 13:57:41 +0000 |
commit | 35ac3e476de39bc50269b9aa178c67e0fc18f3f6 (patch) | |
tree | 589e95e1407e49768562dc041986ed0dcc7ccc37 /plugins/Db_autobackups | |
parent | 623758c88423ace8db961722e83077f30ca23109 (diff) |
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
Diffstat (limited to 'plugins/Db_autobackups')
-rw-r--r-- | plugins/Db_autobackups/src/backup.cpp | 6 | ||||
-rw-r--r-- | plugins/Db_autobackups/src/stdafx.h | 4 |
2 files changed, 5 insertions, 5 deletions
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>
|