-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Changelog: ~ Fixed c:\test vs c:\test123
I really can implement it as m$ does but I think is very crazy to go around some dll, just to make a subpath match. Original m$ code calls: SHGetFolderPath, PathRemoveBackslash, PathCommonPrefix :)
- -- Gianluigi Tiesi sherpya@netfarm.it EDP Project Leader Netfarm S.r.l. - http://www.netfarm.it/ Free Software: http://oss.netfarm.it/
Index: shell32.spec =================================================================== RCS file: /home/wine/wine/dlls/shell32/shell32.spec,v retrieving revision 1.96 diff -u -r1.96 shell32.spec --- shell32.spec 23 Feb 2005 15:41:14 -0000 1.96 +++ shell32.spec 1 Mar 2005 05:35:01 -0000 @@ -250,6 +250,7 @@ # >= NT5 714 stdcall @(ptr) SHELL32_714 # PathIsTemporaryW 730 stdcall -noname RestartDialogEx(long wstr long long) + 755 stdcall -noname PathIsEqualOrSubFolder(wstr wstr)
1217 stub FOOBAR1217 # no joke! This is the real name!!
@@ -456,3 +457,4 @@ # _WIN32_IE >= 0x600 @ stdcall SHDefExtractIconA(str long long ptr ptr long) @ stdcall SHDefExtractIconW(wstr long long ptr ptr long) +@ stub SHCreateShellItem Index: shellpath.c =================================================================== RCS file: /home/wine/wine/dlls/shell32/shellpath.c,v retrieving revision 1.98 diff -u -r1.98 shellpath.c --- shellpath.c 14 Feb 2005 11:07:55 -0000 1.98 +++ shellpath.c 1 Mar 2005 05:35:01 -0000 @@ -411,6 +411,28 @@ }
/************************************************************************* + * PathIsEqualOrSubFolder [SHELL32.755] + */ +BOOL WINAPI PathIsEqualOrSubFolder(LPCWSTR path1, LPCWSTR path2) +{ + int i; + int len; + if (!path1 || !path2) return FALSE; + + len = strlenW(path1); + if (len > strlenW(path2)) return FALSE; + + for (i=0; i < len; i++) + if (tolowerW(path1[i]) != tolowerW(path2[i])) return FALSE; + + /* a trailing backslash in path1, + * makes path2 reach char just after the backslash */ + if (path2[i-1] == '\') return TRUE; + + return (!path2[i] || (path2[i] == '\')); +} + +/************************************************************************* * PathFileExists [SHELL32.45] */ BOOL WINAPI PathFileExistsAW (LPCVOID lpszPath) Index: undocshell.h =================================================================== RCS file: /home/wine/wine/dlls/shell32/undocshell.h,v retrieving revision 1.28 diff -u -r1.28 undocshell.h --- undocshell.h 13 Dec 2004 21:19:01 -0000 1.28 +++ undocshell.h 1 Mar 2005 05:35:01 -0000 @@ -410,6 +410,8 @@
BOOL WINAPI PathIsExeAW(LPCVOID lpszPath);
+BOOL WINAPI PathIsEqualOrSubFolder(LPCWSTR path1, LPCWSTR path2); + BOOL WINAPI PathIsDirectoryAW(LPCVOID lpszPath);
BOOL WINAPI PathFileExistsAW(LPCVOID lpszPath);