Commit f8d321c2 authored by Alexandre Julliard's avatar Alexandre Julliard

Don't try to open CDROM device if none was specified.

parent bdcf66f8
......@@ -302,11 +302,13 @@ static int CDROM_Open(HANDLE hDevice, DWORD clientID)
if (!cdrom_cache[dev].count)
{
char root[4];
const char *device;
strcpy(root, "A:\\");
root[0] += dev;
if (GetDriveTypeA(root) != DRIVE_CDROM) return -1;
cdrom_cache[dev].fd = open(DRIVE_GetDevice(dev), O_RDONLY|O_NONBLOCK);
if (!(device = DRIVE_GetDevice(dev))) return -1;
cdrom_cache[dev].fd = open(device, O_RDONLY|O_NONBLOCK);
if (cdrom_cache[dev].fd == -1)
{
FIXME("Can't open configured CD-ROM drive at %s (device %s): %s\n", root, DRIVE_GetDevice(dev), strerror(errno));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment