summaryrefslogtreecommitdiff
path: root/plugins/Db_autobackups
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Db_autobackups')
-rw-r--r--plugins/Db_autobackups/src/backup.cpp4
-rw-r--r--plugins/Db_autobackups/src/stdafx.h4
2 files changed, 5 insertions, 3 deletions
diff --git a/plugins/Db_autobackups/src/backup.cpp b/plugins/Db_autobackups/src/backup.cpp
index 2967b72aa2..7d715ec7d6 100644
--- a/plugins/Db_autobackups/src/backup.cpp
+++ b/plugins/Db_autobackups/src/backup.cpp
@@ -92,8 +92,8 @@ 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.file_string();
- std::string rpath = filepath.substr(filepath.find(szDir) + mir_strlen(szDir) + 1);
+ const std::string &filepath = file.file_string();
+ const std::string rpath = filepath.substr(filepath.find(szDir) + mir_strlen(szDir) + 1);
HANDLE hSrc;
diff --git a/plugins/Db_autobackups/src/stdafx.h b/plugins/Db_autobackups/src/stdafx.h
index f00a90cb64..77dd225a59 100644
--- a/plugins/Db_autobackups/src/stdafx.h
+++ b/plugins/Db_autobackups/src/stdafx.h
@@ -6,11 +6,13 @@
#include <windows.h>
#include <shlobj.h>
#include <time.h>
-#include <filesystem>
#include <vector>
+
#if defined(_MSC_VER) && (_MSC_VER >= 1800)
+# include <filesystem>
namespace fs = std::tr2::sys;
#else
+# include <experimental/filesystem>
namespace fs = std::experimental::filesystem;
#endif