Description: Fix ‘fs::copy_option’ has not been declared with boost 1.74.0
Author: Louis Sautier <sautier.louis@gmail.com>
Last-Update: 2020-08-20
---
It was deprecated in
https://github.com/boostorg/filesystem/commit/f199152b7df036ff1606c85e4ea1b28edfeda6cc

 lib/base/utility.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/base/utility.cpp b/lib/base/utility.cpp
index 1add7616c..d8e6f20b0 100644
--- a/lib/base/utility.cpp
+++ b/lib/base/utility.cpp
@@ -725,7 +725,11 @@ void Utility::CopyFile(const String& source, const String& target)
 {
 	namespace fs = boost::filesystem;
 
+#if BOOST_VERSION >= 107400
+	fs::copy_file(fs::path(source.Begin(), source.End()), fs::path(target.Begin(), target.End()), fs::copy_options::overwrite_existing);
+#else /* BOOST_VERSION */
 	fs::copy_file(fs::path(source.Begin(), source.End()), fs::path(target.Begin(), target.End()), fs::copy_option::overwrite_if_exists);
+#endif /* BOOST_VERSION */
 }
 
 /*
