Piotr Caban : shell32: Don' t check if files are of the same type if name is equal in IShellFolder2_CompareIDs .

Alexandre Julliard julliard at winehq.org
Thu Jan 13 11:49:02 CST 2011


Module: wine
Branch: master
Commit: 856da7e11dec4f026c641d9fc7463fdadc04d98d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=856da7e11dec4f026c641d9fc7463fdadc04d98d

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Thu Jan 13 15:32:07 2011 +0100

shell32: Don't check if files are of the same type if name is equal in IShellFolder2_CompareIDs.

---

 dlls/shell32/shfldr_unixfs.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/shell32/shfldr_unixfs.c b/dlls/shell32/shfldr_unixfs.c
index c779084..1c9b672 100644
--- a/dlls/shell32/shfldr_unixfs.c
+++ b/dlls/shell32/shfldr_unixfs.c
@@ -1038,15 +1038,15 @@ static HRESULT WINAPI UnixFolder_IShellFolder2_CompareIDs(IShellFolder2* iface,
     else if (isEmpty2)
         return MAKE_HRESULT(SEVERITY_SUCCESS, 0, (WORD)1);
 
-    if (_ILIsFolder(pidl1) && !_ILIsFolder(pidl2)) 
-        return MAKE_HRESULT(SEVERITY_SUCCESS, 0, (WORD)-1);
-    if (!_ILIsFolder(pidl1) && _ILIsFolder(pidl2))
-        return MAKE_HRESULT(SEVERITY_SUCCESS, 0, (WORD)1);
-
     compare = CompareStringA(LOCALE_USER_DEFAULT, NORM_IGNORECASE, 
                              _ILGetTextPointer(pidl1), -1,
                              _ILGetTextPointer(pidl2), -1);
-    
+
+    if ((compare != CSTR_EQUAL) && _ILIsFolder(pidl1) && !_ILIsFolder(pidl2))
+        return MAKE_HRESULT(SEVERITY_SUCCESS, 0, (WORD)-1);
+    if ((compare != CSTR_EQUAL) && !_ILIsFolder(pidl1) && _ILIsFolder(pidl2))
+        return MAKE_HRESULT(SEVERITY_SUCCESS, 0, (WORD)1);
+
     if ((compare == CSTR_LESS_THAN) || (compare == CSTR_GREATER_THAN)) 
         return MAKE_HRESULT(SEVERITY_SUCCESS, 0, (WORD)((compare == CSTR_LESS_THAN)?-1:1));
 




More information about the wine-cvs mailing list