From 27a2004430072e0772a84d29fbb922479b9216c6 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 26 Mar 2004 02:29:48 +0000 Subject: [PATCH] Fixed GetDriveType16 return value for non-existent drives. Fixed bug in OpenFile16 introduced by previous change. --- dlls/kernel/file16.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/kernel/file16.c b/dlls/kernel/file16.c index 6e2a17128bb..2f60e8cc45c 100644 --- a/dlls/kernel/file16.c +++ b/dlls/kernel/file16.c @@ -123,7 +123,7 @@ HFILE16 WINAPI OpenFile16( LPCSTR name, OFSTRUCT *ofs, UINT16 mode ) HANDLE handle; FILETIME filetime; WORD filedatetime[2]; - char *p, *filename; + const char *p, *filename; if (!ofs) return HFILE_ERROR; @@ -183,7 +183,7 @@ HFILE16 WINAPI OpenFile16( LPCSTR name, OFSTRUCT *ofs, UINT16 mode ) { /* If OF_SEARCH is set, ignore the given path */ - filename = ofs->szPathName; + filename = name; if ((mode & OF_SEARCH) && !(mode & OF_REOPEN)) { /* First try the file name as is */ @@ -476,6 +476,7 @@ UINT16 WINAPI GetDriveType16( UINT16 drive ) /* [in] number (NOT letter) of driv root[2] = 0; type = GetDriveTypeW( root ); if (type == DRIVE_CDROM) type = DRIVE_REMOTE; + else if (type == DRIVE_NO_ROOT_DIR) type = DRIVE_UNKNOWN; return type; } -- 2.11.4.GIT