With the change to the newer User Profile directory names, the code to match agains the legacy directory targets, of the form '$HOME/My XXX', can be removed. The newer Windows USERPROFILE directory names now mirror standard XDG directory names.
Signed-off-by: Rob Walker bob.mt.wya@gmail.com --- dlls/shell32/shellpath.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c index 5bf027f6f2..6c6d879cb6 100644 --- a/dlls/shell32/shellpath.c +++ b/dlls/shell32/shellpath.c @@ -4397,14 +4397,12 @@ static inline BOOL _SHAppendToUnixPath(char *szBasePath, LPCWSTR pwszSubPath) { * (in the current Wineprefix). * 2) Create a symbolic link from the '%USERPROFILE%\XXX' User Profile directory * to: - * Resource ID 'XXX' - if '$HOME/XXX' exists then target this. * XDG_XXX_DIR - if '$XDG_XXX_DIR' exists then target this. * MacOS 'XXX' directory - if '$HOME/XXX' exists then target this. * */ static void _SHCreateSymbolicLinks(void) { - UINT ids_dirs[] = { IDS_PERSONAL, IDS_MYMUSIC, IDS_MYPICTURES, IDS_MYVIDEOS, IDS_DESKTOPDIRECTORY }; const WCHAR* ws_osx_dirs[] = { DocumentsW, MusicW, PicturesW, MoviesW, DesktopW }; int csidl_dirs[] = { CSIDL_PERSONAL, CSIDL_MYMUSIC, CSIDL_MYPICTURES, CSIDL_MYVIDEO, CSIDL_DESKTOPDIRECTORY }; static const char * const xdg_dirnames[] = { "DOCUMENTS", "MUSIC", "PICTURES", "VIDEOS", "DESKTOP" }; @@ -4436,16 +4434,8 @@ static void _SHCreateSymbolicLinks(void) if (!prefix_profile_dir) continue;
target_ok = FALSE; - /* Try to target a pre-existing '$HOME/My XXX' folder. */ - strcpy(home_target_dir, env_homedir); - if ((ids_dirs[i] != IDS_DESKTOPDIRECTORY) && - _SHAppendToUnixPath(home_target_dir, MAKEINTRESOURCEW(ids_dirs[i])) && - !stat(home_target_dir, &stat_folder) && S_ISDIR(stat_folder.st_mode)) - { - target_ok = TRUE; - } /* Try to target the XDG_XXX_DIR folder. */ - else if (xdg_dirs && xdg_dirs[i]) + if (xdg_dirs && xdg_dirs[i]) { strcpy(home_target_dir, xdg_dirs[i]); target_ok = TRUE;