From 89481f43a547291bf060fdf0d3468a6673fd4ca3 Mon Sep 17 00:00:00 2001 From: Tim Clem Date: Fri, 10 May 2024 12:29:27 -0700 Subject: [PATCH] mountmgr.sys: Do not add drive letters or volumes for macOS volumes without mount paths. Mounted volumes that are not represented in the filesystem are system volumes that we should ignore (e.g. recovery and preboot). --- dlls/mountmgr.sys/diskarb.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/mountmgr.sys/diskarb.c b/dlls/mountmgr.sys/diskarb.c index 63986c3df93..d33f6c60afb 100644 --- a/dlls/mountmgr.sys/diskarb.c +++ b/dlls/mountmgr.sys/diskarb.c @@ -91,9 +91,12 @@ static void appeared_callback( DADiskRef disk, void *context ) if ((volume_url = CFDictionaryGetValue( dict, CFSTR("DAVolumePath") ))) CFURLGetFileSystemRepresentation( volume_url, true, (UInt8 *)mount_point, sizeof(mount_point) ); else - mount_point[0] = 0; + { + TRACE( "ignoring volume %s, uuid %s: no macOS volume path\n", device, wine_dbgstr_guid(guid_ptr) ); + goto done; + } - if (volume_url && CFURLCopyResourcePropertyForKey( volume_url, kCFURLVolumeIsBrowsableKey, &ref, NULL )) + if (CFURLCopyResourcePropertyForKey( volume_url, kCFURLVolumeIsBrowsableKey, &ref, NULL )) { Boolean is_browsable = CFBooleanGetValue( ref ); CFRelease( ref );