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 23:38:28 +0200
commit96f50dd5e600925488fdd9db1580aa01b026269b (patch)
treeea8b837a596eb99a7416bfdbfd2d7e4f38603a7b /src/lib/scp_uploader.cc
parent94a9473993b027b9368077009decbdd4322f90e3 (diff)
Use dcp::filesystem to wrap filesystem calls and fix_long_path
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);