aboutsummaryrefslogtreecommitdiff
path: root/src/fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs.h')
-rw-r--r--src/fs.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/fs.h b/src/fs.h
index c179be7607..9f18794539 100644
--- a/src/fs.h
+++ b/src/fs.h
@@ -92,6 +92,13 @@ static inline path operator+(path p1, path p2)
return p1;
}
+// Disallow implicit std::string conversion for copy_file
+// to avoid locale-dependent encoding on Windows.
+static inline void copy_file(const path& from, const path& to, copy_option options)
+{
+ boost::filesystem::copy_file(from, to, options);
+}
+
/**
* Convert path object to byte string. On POSIX, paths natively are byte
* strings, so this is trivial. On Windows, paths natively are Unicode, so an