From 96f50dd5e600925488fdd9db1580aa01b026269b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 6 Oct 2023 02:37:16 +0200 Subject: 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. --- src/lib/image_content.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/lib/image_content.cc') diff --git a/src/lib/image_content.cc b/src/lib/image_content.cc index bb2de9307..1a92c944e 100644 --- a/src/lib/image_content.cc +++ b/src/lib/image_content.cc @@ -30,6 +30,7 @@ #include "util.h" #include "video_content.h" #include +#include #include #include @@ -49,7 +50,7 @@ ImageContent::ImageContent (boost::filesystem::path p) { video = make_shared(this); - if (boost::filesystem::is_regular_file (p) && valid_image_file (p)) { + if (dcp::filesystem::is_regular_file(p) && valid_image_file(p)) { add_path (p); } else { _path_to_scan = p; @@ -116,8 +117,8 @@ ImageContent::examine (shared_ptr film, shared_ptr job) job->sub (_("Scanning image files")); vector paths; int n = 0; - for (auto i: boost::filesystem::directory_iterator(*_path_to_scan)) { - if (boost::filesystem::is_regular_file(i.path()) && valid_image_file (i.path())) { + for (auto i: dcp::filesystem::directory_iterator(*_path_to_scan)) { + if (dcp::filesystem::is_regular_file(i.path()) && valid_image_file(i.path())) { paths.push_back (i.path()); } ++n; -- cgit v1.2.3