winedos: Get File Attributes must fail for files with names ending in slash.

This commit is contained in:
Dan Kegel 2009-01-28 23:32:18 -08:00 committed by Alexandre Julliard
parent cdb0497d7a
commit d71a60378d
1 changed files with 8 additions and 1 deletions

View File

@ -2028,12 +2028,19 @@ static BOOL INT21_FileAttributes( CONTEXT86 *context,
FILETIME filetime; FILETIME filetime;
DWORD result; DWORD result;
WORD date, time; WORD date, time;
int len;
switch (subfunction) switch (subfunction)
{ {
case 0x00: /* GET FILE ATTRIBUTES */ case 0x00: /* GET FILE ATTRIBUTES */
TRACE( "GET FILE ATTRIBUTES for %s\n", fileA ); TRACE( "GET FILE ATTRIBUTES for %s\n", fileA );
MultiByteToWideChar(CP_OEMCP, 0, fileA, -1, fileW, MAX_PATH); len = MultiByteToWideChar(CP_OEMCP, 0, fileA, -1, fileW, MAX_PATH);
/* Winbench 96 Disk Test fails if we don't complain
* about a filename that ends in \
*/
if (!len || (fileW[len-1] == '/') || (fileW[len-1] == '\\'))
return FALSE;
result = GetFileAttributesW( fileW ); result = GetFileAttributesW( fileW );
if (result == INVALID_FILE_ATTRIBUTES) if (result == INVALID_FILE_ATTRIBUTES)