From eb0ab1b1ec844b9341b506ab06c2843fa9cb5040 Mon Sep 17 00:00:00 2001 From: Stefan Leichter Date: Fri, 18 Aug 2000 23:45:46 +0000 Subject: [PATCH] Fixed return value of CDROM_GetLabel if CDROM_Open failed (e.g. no Device entry for drive in wine.conf). --- files/dos_fs.c | 2 ++ misc/cdrom.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/files/dos_fs.c b/files/dos_fs.c index 95add12d1de..a11dab2889c 100644 --- a/files/dos_fs.c +++ b/files/dos_fs.c @@ -1305,6 +1305,8 @@ static int DOSFS_FindNextEx( FIND_FIRST_INFO *info, WIN32_FIND_DATAA *entry ) DOSFS_ToDosDTAFormat( DRIVE_GetLabel( info->drive ), entry->cFileName ); strcpy( entry->cAlternateFileName, entry->cFileName ); info->cur_pos++; + TRACE("returning %s (%s) as label\n", + entry->cFileName, entry->cAlternateFileName); return 1; } diff --git a/misc/cdrom.c b/misc/cdrom.c index 14a2ffe113c..343a6cc818c 100644 --- a/misc/cdrom.c +++ b/misc/cdrom.c @@ -780,6 +780,9 @@ DWORD CDROM_GetLabel(int drive, char *label) p, label); CDROM_Close(&wcda); } + else + res = 0; + return res; }