Use dcp::filesystem to wrap filesystem calls and fix_long_path
[dcpomatic.git] / src / lib / find_missing.cc
index 2234637b3150aaa334d245040b172d3caa02adba..199ffcc19ccab35ad4b4e381a507be6160a071c5 100644 (file)
@@ -22,7 +22,7 @@
 #include "content.h"
 #include "find_missing.h"
 #include "util.h"
-#include <boost/filesystem.hpp>
+#include <dcp/filesystem.h>
 
 
 using std::map;
@@ -38,16 +38,16 @@ void
 search (Replacements& replacement_paths, boost::filesystem::path directory, int depth = 0)
 {
        boost::system::error_code ec;
-       for (auto candidate: boost::filesystem::directory_iterator(directory, ec)) {
-               if (boost::filesystem::is_regular_file(candidate.path())) {
+       for (auto candidate: dcp::filesystem::directory_iterator(directory, ec)) {
+               if (dcp::filesystem::is_regular_file(candidate.path())) {
                        for (auto& replacement: replacement_paths) {
                                for (auto& path: replacement.second) {
-                                       if (!boost::filesystem::exists(path) && path.filename() == candidate.path().filename()) {
+                                       if (!dcp::filesystem::exists(path) && path.filename() == candidate.path().filename()) {
                                                path = candidate.path();
                                        }
                                }
                        }
-               } else if (boost::filesystem::is_directory(candidate.path()) && depth <= 2) {
+               } else if (dcp::filesystem::is_directory(candidate.path()) && depth <= 2) {
                        search (replacement_paths, candidate, depth + 1);
                }
        }