Skip to content

Commit f12b878

Browse files
elad335schm1dtmac
authored andcommitted
Update disk path validation for Mac OS X
1 parent d513db1 commit f12b878

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Utilities/File.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1234,7 +1234,7 @@ bool fs::is_optical_raw_device(const std::string& path)
12341234
#if defined(__APPLE__)
12351235
// On Mac OS X optical disks will only ever be mounted under /dev/disk(whatever), similar for raw devices,
12361236
// so reject anything not containing the disk string.
1237-
if (!path.contains("disk"))
1237+
if (!path.starts_with("/dev/disk") && !path.starts_with("/dev/rdisk"))
12381238
{
12391239
return false;
12401240
}

0 commit comments

Comments
 (0)