diff options
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/dcpomatic.cc | 11 | ||||
| -rw-r--r-- | src/tools/dcpomatic_batch.cc | 5 | ||||
| -rw-r--r-- | src/tools/dcpomatic_cli.cc | 3 | ||||
| -rw-r--r-- | src/tools/dcpomatic_create.cc | 5 | ||||
| -rw-r--r-- | src/tools/dcpomatic_kdm.cc | 3 | ||||
| -rw-r--r-- | src/tools/dcpomatic_player.cc | 5 | ||||
| -rw-r--r-- | src/tools/dcpomatic_playlist.cc | 5 |
7 files changed, 22 insertions, 15 deletions
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index 0ed65da8d..979672fb4 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -91,6 +91,7 @@ #include "lib/version.h" #include "lib/video_content.h" #include <dcp/exceptions.h> +#include <dcp/filesystem.h> #include <dcp/raw_convert.h> #include <dcp/warnings.h> LIBDCP_DISABLE_WARNINGS @@ -475,7 +476,7 @@ public: } catch (FileNotFoundError& e) { auto const dir = e.file().parent_path(); - if (boost::filesystem::exists(dir / "ASSETMAP") || boost::filesystem::exists(dir / "ASSETMAP.xml")) { + if (dcp::filesystem::exists(dir / "ASSETMAP") || dcp::filesystem::exists(dir / "ASSETMAP.xml")) { error_dialog ( this, _("Could not open this folder as a DCP-o-matic project."), _("It looks like you are trying to open a DCP. File -> Open is for loading DCP-o-matic projects, not DCPs. To import a DCP, create a new project with File -> New and then click the \"Add DCP...\" button.") @@ -803,11 +804,11 @@ private: /* Remove any existing DCP if the user agrees */ auto const dcp_dir = _film->dir (_film->dcp_name(), false); - if (boost::filesystem::exists(dcp_dir)) { + if (dcp::filesystem::exists(dcp_dir)) { if (!confirm_dialog (this, wxString::Format (_("Do you want to overwrite the existing DCP %s?"), std_to_wx(dcp_dir.string()).data()))) { return; } - boost::filesystem::remove_all (dcp_dir); + dcp::filesystem::remove_all(dcp_dir); } try { @@ -981,7 +982,7 @@ private: return; } - if (boost::filesystem::exists(dialog.path())) { + if (dcp::filesystem::exists(dialog.path())) { bool ok = confirm_dialog( this, wxString::Format(_("File %s already exists. Do you want to overwrite it?"), std_to_wx(dialog.path().string()).data()) @@ -1676,7 +1677,7 @@ private: signal_manager = new wxSignalManager (this); Bind (wxEVT_IDLE, boost::bind (&App::idle, this, _1)); - if (!_film_to_load.empty() && boost::filesystem::is_directory(_film_to_load)) { + if (!_film_to_load.empty() && dcp::filesystem::is_directory(_film_to_load)) { try { _frame->load_film (_film_to_load); } catch (exception& e) { diff --git a/src/tools/dcpomatic_batch.cc b/src/tools/dcpomatic_batch.cc index 24897dfba..dc092bf8c 100644 --- a/src/tools/dcpomatic_batch.cc +++ b/src/tools/dcpomatic_batch.cc @@ -37,6 +37,7 @@ #include "lib/transcode_job.h" #include "lib/util.h" #include "lib/version.h" +#include <dcp/filesystem.h> #include <dcp/warnings.h> LIBDCP_DISABLE_WARNINGS #include <wx/aboutdlg.h> @@ -129,7 +130,7 @@ public: if (filenames.GetCount() == 1) { /* Try to load a directory */ auto path = boost::filesystem::path(wx_to_std(filenames[0])); - if (boost::filesystem::is_directory(path)) { + if (dcp::filesystem::is_directory(path)) { _frame->start_job(wx_to_std(filenames[0])); return true; } @@ -479,7 +480,7 @@ class App : public wxApp shared_ptr<Film> film; for (auto i: films_to_load) { - if (boost::filesystem::is_directory(i)) { + if (dcp::filesystem::is_directory(i)) { try { film = make_shared<Film>(i); film->read_metadata (); diff --git a/src/tools/dcpomatic_cli.cc b/src/tools/dcpomatic_cli.cc index 3e1e13c51..96bf83086 100644 --- a/src/tools/dcpomatic_cli.cc +++ b/src/tools/dcpomatic_cli.cc @@ -39,6 +39,7 @@ #include "lib/util.h" #include "lib/version.h" #include "lib/video_content.h" +#include <dcp/filesystem.h> #include <dcp/version.h> #include <getopt.h> #include <iostream> @@ -442,7 +443,7 @@ main (int argc, char* argv[]) for (auto i: film->content()) { auto paths = i->paths(); for (auto j: paths) { - if (!boost::filesystem::exists(j)) { + if (!dcp::filesystem::exists(j)) { cerr << argv[0] << ": content file " << j << " not found.\n"; exit (EXIT_FAILURE); } diff --git a/src/tools/dcpomatic_create.cc b/src/tools/dcpomatic_create.cc index 63889a597..5b5f4dba2 100644 --- a/src/tools/dcpomatic_create.cc +++ b/src/tools/dcpomatic_create.cc @@ -36,6 +36,7 @@ #include "lib/version.h" #include "lib/video_content.h" #include <dcp/exceptions.h> +#include <dcp/filesystem.h> #include <libxml++/libxml++.h> #include <boost/filesystem.hpp> #include <getopt.h> @@ -94,10 +95,10 @@ main (int argc, char* argv[]) auto film = cc.make_film(); for (auto cli_content: cc.content) { - auto const can = boost::filesystem::canonical (cli_content.path); + auto const can = dcp::filesystem::canonical(cli_content.path); vector<shared_ptr<Content>> film_content_list; - if (boost::filesystem::exists (can / "ASSETMAP") || (boost::filesystem::exists (can / "ASSETMAP.xml"))) { + if (dcp::filesystem::exists(can / "ASSETMAP") || (dcp::filesystem::exists(can / "ASSETMAP.xml"))) { auto dcp = make_shared<DCPContent>(can); film_content_list.push_back (dcp); if (cli_content.kdm) { diff --git a/src/tools/dcpomatic_kdm.cc b/src/tools/dcpomatic_kdm.cc index 6628c2b3f..fbeac7640 100644 --- a/src/tools/dcpomatic_kdm.cc +++ b/src/tools/dcpomatic_kdm.cc @@ -53,6 +53,7 @@ #include <dcp/encrypted_kdm.h> #include <dcp/decrypted_kdm.h> #include <dcp/exceptions.h> +#include <dcp/filesystem.h> #include <dcp/warnings.h> LIBDCP_DISABLE_WARNINGS #include <wx/dnd.h> @@ -312,7 +313,7 @@ private: bool confirm_overwrite (boost::filesystem::path path) { - if (boost::filesystem::is_directory(path)) { + if (dcp::filesystem::is_directory(path)) { return confirm_dialog ( this, wxString::Format(_("Folder %s already exists. Do you want to overwrite it?"), std_to_wx(path.string()).data()) diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index c4f0e886c..88b0f839d 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -68,6 +68,7 @@ #include <dcp/cpl.h> #include <dcp/dcp.h> #include <dcp/exceptions.h> +#include <dcp/filesystem.h> #include <dcp/raw_convert.h> #include <dcp/search.h> #include <dcp/warnings.h> @@ -169,7 +170,7 @@ public: if (filenames.GetCount() == 1) { /* Try to load a directory */ auto path = boost::filesystem::path(wx_to_std(filenames[0])); - if (boost::filesystem::is_directory(path)) { + if (dcp::filesystem::is_directory(path)) { _frame->load_dcp(wx_to_std(filenames[0])); return true; } @@ -1236,7 +1237,7 @@ private: LOG_DEBUG_PLAYER ("Failed to start play server (%1)", e.what()); } - if (!_dcp_to_load.empty() && boost::filesystem::is_directory (_dcp_to_load)) { + if (!_dcp_to_load.empty() && dcp::filesystem::is_directory(_dcp_to_load)) { try { _frame->load_dcp (_dcp_to_load); } catch (exception& e) { diff --git a/src/tools/dcpomatic_playlist.cc b/src/tools/dcpomatic_playlist.cc index cb153d6c1..e4ad3c658 100644 --- a/src/tools/dcpomatic_playlist.cc +++ b/src/tools/dcpomatic_playlist.cc @@ -32,6 +32,7 @@ #include "lib/film.h" #include "lib/spl.h" #include "lib/spl_entry.h" +#include <dcp/filesystem.h> #include <dcp/warnings.h> LIBDCP_DISABLE_WARNINGS #include <wx/imaglist.h> @@ -222,7 +223,7 @@ private: _list->DeleteAllItems (); _playlists.clear (); - for (auto i: boost::filesystem::directory_iterator(*path)) { + for (auto i: dcp::filesystem::directory_iterator(*path)) { auto spl = make_shared<SignalSPL>(); try { spl->read (i, _content_store); @@ -271,7 +272,7 @@ private: return; } - boost::filesystem::remove(*dir / (_playlists[*index]->id() + ".xml")); + dcp::filesystem::remove(*dir / (_playlists[*index]->id() + ".xml")); _list->DeleteItem(*index); _playlists.erase(_playlists.begin() + *index); |
