- boost::uintmax_t to_do = boost::filesystem::file_size (from);
- ssh_scp_push_file (_scp, to.string().c_str(), to_do, S_IRUSR | S_IWUSR);
-
- FILE* f = fopen_boost (from, "rb");
- if (f == 0) {
- throw NetworkError (String::compose (_("Could not open %1 to send"), from));
+ auto to_do = boost::filesystem::file_size (from);
+ /* Use generic_string so that we get forward-slashes in the path, even on Windows */
+LIBDCP_DISABLE_WARNINGS
+ ssh_scp_push_file (_scp, to.generic_string().c_str(), to_do, S_IRUSR | S_IWUSR);
+LIBDCP_ENABLE_WARNINGS
+
+ dcp::File f(from, "rb");
+ if (!f) {
+ throw NetworkError (String::compose(_("Could not open %1 to send"), from));