[Bug 49075] foobar2000 reports 'No CD drives found.' because GetDriveTypeW returns DRIVE_FIXED for audio CD

WineHQ Bugzilla wine-bugs at winehq.org
Tue May 5 09:22:22 CDT 2020


https://bugs.winehq.org/show_bug.cgi?id=49075

--- Comment #3 from Michael McGuire <spoon0042 at hotmail.com> ---
Poking at this more, the drive string (root) gets passed as is to
get_mountmgr_drive_type() which assumes the first character is the drive
letter, but since it's '\' returns 0. GDTW maps this to DRIVE_FIXED (3) if the
drive exists or DRIVE_NO_ROOT_DIR (1) if not. (The automatic audio CD
assignment is "not" in this case. Done manually it returns 3 though.)

For me anyway, no idea how this is working for the other person on the forum.

A less stupid hack that also works for me anyway but is probably still wrong:
add to the top of GTDW

static const WCHAR device_prefix[4] = {'\\','\\','.','\\'};

if (!memcmp(root, device_prefix, sizeof(device_prefix))) root += 4;

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list