Fixed GetDriveType16 return value for non-existent drives.

Fixed bug in OpenFile16 introduced by previous change.
This commit is contained in:
Alexandre Julliard 2004-03-26 02:29:48 +00:00
parent 906be1dcb0
commit 27a2004430
1 changed files with 3 additions and 2 deletions

View File

@ -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;
}