summaryrefslogtreecommitdiff
path: root/src/lib/image_content.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/image_content.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/image_content.cc')
-rw-r--r--src/lib/image_content.cc7
1 files changed, 4 insertions, 3 deletions
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 <libcxml/cxml.h>
+#include <dcp/filesystem.h>
#include <libxml++/libxml++.h>
#include <iostream>
@@ -49,7 +50,7 @@ ImageContent::ImageContent (boost::filesystem::path p)
{
video = make_shared<VideoContent>(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<const Film> film, shared_ptr<Job> job)
job->sub (_("Scanning image files"));
vector<boost::filesystem::path> 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;