Vincent Povirk : shell32: Support SFGAO_LINK in unix shell namespace.

Alexandre Julliard julliard at winehq.org
Tue Sep 26 14:56:15 CDT 2017


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

Author: Vincent Povirk <vincent at codeweavers.com>
Date:   Mon Sep 25 15:35:19 2017 -0500

shell32: Support SFGAO_LINK in unix shell namespace.

Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/shell32/shfldr_unixfs.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/dlls/shell32/shfldr_unixfs.c b/dlls/shell32/shfldr_unixfs.c
index 709e822..e74e4db 100644
--- a/dlls/shell32/shfldr_unixfs.c
+++ b/dlls/shell32/shfldr_unixfs.c
@@ -1140,7 +1140,7 @@ static HRESULT WINAPI ShellFolder2_GetAttributesOf(IShellFolder2* iface, UINT ci
         UINT i;
 
         *attrs = SFGAO_CANCOPY | SFGAO_CANMOVE | SFGAO_CANLINK | SFGAO_CANRENAME | SFGAO_CANDELETE |
-            SFGAO_HASPROPSHEET | SFGAO_DROPTARGET | SFGAO_FILESYSTEM;
+            SFGAO_HASPROPSHEET | SFGAO_DROPTARGET | SFGAO_FILESYSTEM | SFGAO_LINK;
         lstrcpyA(szAbsolutePath, This->m_pszPath);
         pszRelativePath = szAbsolutePath + lstrlenA(szAbsolutePath);
         for (i=0; i<cidl; i++) {
@@ -1158,6 +1158,13 @@ static HRESULT WINAPI ShellFolder2_GetAttributesOf(IShellFolder2* iface, UINT ci
                     SFGAO_STORAGEANCESTOR | SFGAO_STORAGE;
             else
                 *attrs |= SFGAO_STREAM;
+            if ((*attrs & SFGAO_LINK))
+            {
+                char ext[MAX_PATH];
+
+                if (!_ILGetExtension(apidl[i], ext, MAX_PATH) || lstrcmpiA(ext, "lnk"))
+                    *attrs &= ~SFGAO_LINK;
+            }
         }
     }
 




More information about the wine-cvs mailing list