Don't offer full-frame containers unless 'allow any container' is enabled.
[dcpomatic.git] / src / lib / cross_osx.cc
index 66be376d4cc7264d26d76a8a62a7bb406f207668..a15ad032257be78bc907b2d107e6d54190186900 100644 (file)
@@ -298,10 +298,19 @@ analyse_media_path (CFDictionaryRef& description)
 
        void const* str = CFDictionaryGetValue (description, kDADiskDescriptionMediaPathKey);
        if (!str) {
+               LOG_DISK_NC("There is no MediaPathKey");
                return optional<MediaPath>();
        }
 
        string path(CFStringGetCStringPtr((CFStringRef) str, kCFStringEncodingUTF8));
+       LOG_DISK("MediaPathKey is %1", path);
+
+       if (path.find("/IOHDIXController") != string::npos) {
+               /* This is a disk image, so we completely ignore it */
+               LOG_DISK_NC("Ignoring this as it seems to be a disk image");
+               return optional<MediaPath>();
+       }
+
        MediaPath mp;
        if (starts_with(path, "IODeviceTree:")) {
                mp.real = true;
@@ -494,15 +503,6 @@ Drive::get ()
 }
 
 
-string
-Drive::device_for_write () const
-{
-       string w = _device;
-       boost::replace_all (w, "/dev/disk", "/dev/rdisk");
-       return w;
-}
-
-
 boost::filesystem::path
 config_path ()
 {