shell32 patch 23f [resend]
Martin Fuchs
martin-fuchs at gmx.net
Fri Apr 9 07:50:30 CDT 2004
Changelog:
check for folders in ShellExecute()
Sorry if the attached patch looks longer than needed, but I had to indent a section of 'if' case and diff seems to be confused by this change. This is what is changed really (without this indentation change):
diff -u -p -d -w -b -r1.40 shlexec.c
--- shlexec.c 7 Apr 2004 03:49:51 -0000 1.40
+++ shlexec.c 9 Apr 2004 12:42:31 -0000
@@ -524,6 +524,7 @@ UINT SHELL_FindExecutable(LPCWSTR lpPath
UINT retval = 31; /* default - 'No association was found' */
WCHAR *tok; /* token pointer */
WCHAR xlpFile[256]; /* result of SearchPath */
+ DWORD attribs; /* file attributes */
TRACE("%s\n", (lpFile != NULL) ? debugstr_w(lpFile) : "-");
@@ -552,6 +553,14 @@ UINT SHELL_FindExecutable(LPCWSTR lpPath
/* Hey, isn't this value ignored? Why make this call? Shouldn't we return here? --dank*/
}
+ attribs = GetFileAttributesW(lpFile);
+ if (attribs!=INVALID_FILE_ATTRIBUTES && (attribs&FILE_ATTRIBUTE_DIRECTORY))
+ {
+ strcpyW(filetype, wszFolder);
+ filetypelen = 6; /* strlen("Folder") */
+ }
+ else
+ {
/* First thing we need is the file's extension */
extension = strrchrW(xlpFile, '.'); /* Assume last "." is the one; */
/* File->Run in progman uses */
@@ -618,6 +627,7 @@ UINT SHELL_FindExecutable(LPCWSTR lpPath
filetypelen /= sizeof(WCHAR);
filetype[filetypelen] = '\0';
TRACE("File type: %s\n", debugstr_w(filetype));
+ }
}
if (*filetype)
--
Martin Fuchs
martin-fuchs at gmx.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shell32-patch23f-resend.patch
Type: application/octet-stream
Size: 7642 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20040409/c6efb9f4/shell32-patch23f-resend.obj
More information about the wine-patches
mailing list