[PATCH 05/11] shell32: _SHCreateSymbolicLinks() don't symlink directly to $HOME

Rob Walker bob.mt.wya at gmail.com
Mon Jul 16 17:46:59 CDT 2018


Remove the code path which falls back to symlinking User Profile media directories to
the user's $HOME directory. End users will not appreciate having their $HOME
directory (potentially) filled up with Windows-related files / directories.
Remove unnecessary code comment, about directory removal.

Signed-off-by: Rob Walker <bob.mt.wya at gmail.com>
---
 dlls/shell32/shellpath.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c
index 0e2ee2e263..cf4d9ffbd0 100644
--- a/dlls/shell32/shellpath.c
+++ b/dlls/shell32/shellpath.c
@@ -4465,12 +4465,11 @@ static void _SHCreateSymbolicLinks(void)
                                             && S_ISDIR(statFolder.st_mode);
         }
 
-        /* Target the '$HOME' folder directly (fallback). */
-        if (!target_ok)
-            strcpy(szPersonalTarget, pszHome);
-
-        remove(pszPersonal);
-        symlink(szPersonalTarget, pszPersonal);
+        if (target_ok)
+        {
+            remove(pszPersonal);
+            symlink(szPersonalTarget, pszPersonal);
+        }
     }
 
     /* Create symbolic links for 'My Pictures', 'My Videos' and 'My Music'. */
-- 
2.18.0




More information about the wine-devel mailing list