projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2a3ba95
)
Add some more macOS debug logging for disks, and ignore mounted disk images.
author
Carl Hetherington
<cth@carlh.net>
Thu, 30 Apr 2020 14:55:46 +0000
(16:55 +0200)
committer
Carl Hetherington
<cth@carlh.net>
Thu, 30 Apr 2020 14:55:46 +0000
(16:55 +0200)
src/lib/cross_osx.cc
patch
|
blob
|
history
diff --git
a/src/lib/cross_osx.cc
b/src/lib/cross_osx.cc
index 3b08c96849edc328b3808b361885d9ef035eb3f8..a15ad032257be78bc907b2d107e6d54190186900 100644
(file)
--- a/
src/lib/cross_osx.cc
+++ b/
src/lib/cross_osx.cc
@@
-298,10
+298,19
@@
analyse_media_path (CFDictionaryRef& description)
void const* str = CFDictionaryGetValue (description, kDADiskDescriptionMediaPathKey);
if (!str) {
void const* str = CFDictionaryGetValue (description, kDADiskDescriptionMediaPathKey);
if (!str) {
+ LOG_DISK_NC("There is no MediaPathKey");
return optional<MediaPath>();
}
string path(CFStringGetCStringPtr((CFStringRef) str, kCFStringEncodingUTF8));
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;
MediaPath mp;
if (starts_with(path, "IODeviceTree:")) {
mp.real = true;