Dan Kegel : winedos: Get File Attributes must fail for files with names ending in slash.
Alexandre Julliard
julliard at winehq.org
Thu Jan 29 09:15:45 CST 2009
Module: wine
Branch: master
Commit: d71a60378df9d2cd89c19d3231e8f4c40a94c953
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d71a60378df9d2cd89c19d3231e8f4c40a94c953
Author: Dan Kegel <dank at kegel.com>
Date: Wed Jan 28 23:32:18 2009 -0800
winedos: Get File Attributes must fail for files with names ending in slash.
---
dlls/winedos/int21.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/dlls/winedos/int21.c b/dlls/winedos/int21.c
index b8a1163..140885c 100644
--- a/dlls/winedos/int21.c
+++ b/dlls/winedos/int21.c
@@ -2028,12 +2028,19 @@ static BOOL INT21_FileAttributes( CONTEXT86 *context,
FILETIME filetime;
DWORD result;
WORD date, time;
+ int len;
switch (subfunction)
{
case 0x00: /* GET FILE ATTRIBUTES */
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 );
if (result == INVALID_FILE_ATTRIBUTES)
More information about the wine-cvs
mailing list