Use dcp::filesystem to wrap filesystem calls and fix_long_path
[dcpomatic.git] / src / tools / dcpomatic_player.cc
index 81af93b9ea4b50f7d2fd6db336c183a6ea75ba3d..88b0f839df0e540069bedfc00b9dc9f5d1797f6c 100644 (file)
@@ -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;
                                }
@@ -454,9 +455,9 @@ public:
                _info->triggered_update ();
        }
 
-       void film_changed (ChangeType type, Film::Property property)
+       void film_changed (ChangeType type, FilmProperty property)
        {
-               if (type != ChangeType::DONE || property != Film::Property::CONTENT) {
+               if (type != ChangeType::DONE || property != FilmProperty::CONTENT) {
                        return;
                }
 
@@ -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) {