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 23:38:28 +0200
commit96f50dd5e600925488fdd9db1580aa01b026269b (patch)
treeea8b837a596eb99a7416bfdbfd2d7e4f38603a7b /src/lib/image_content.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/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;