summaryrefslogtreecommitdiff
path: root/src/lib/scp_uploader.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-10-06 02:37:16 +0200
committerCarl Hetherington <cth@carlh.net>2023-10-09 01:21:22 +0200
commitf0f4dd5e6b6ed5e50d0444a4de3b2a13156edf64 (patch)
treedce96c211c6d92062187e8c40026c04a26af72e9 /src/lib/scp_uploader.cc
parent89e39ea9e20bc4f8e88e42a57d4505e1fa69fde5 (diff)
Use dcp::filesystem to wrap filesystem calls and fix_long_path2623-add-windows
anything that is passed to read_file() from libcxml. This should fix #2623 and other similar problems.
Diffstat (limited to 'src/lib/scp_uploader.cc')
-rw-r--r--src/lib/scp_uploader.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/scp_uploader.cc b/src/lib/scp_uploader.cc
index dbe82b67f..6c63a6c3e 100644
--- a/src/lib/scp_uploader.cc
+++ b/src/lib/scp_uploader.cc
@@ -26,6 +26,7 @@
#include "cross.h"
#include "compose.hpp"
#include <dcp/file.h>
+#include <dcp/filesystem.h>
#include <dcp/warnings.h>
#include <sys/stat.h>
@@ -110,7 +111,7 @@ LIBDCP_ENABLE_WARNINGS
void
SCPUploader::upload_file (boost::filesystem::path from, boost::filesystem::path to, boost::uintmax_t& transferred, boost::uintmax_t total_size)
{
- auto to_do = boost::filesystem::file_size (from);
+ auto to_do = dcp::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);