This matches what recent Windows versions set in the process environment.
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/shell32/shellpath.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c index de4bf7d566..4b92e82065 100644 --- a/dlls/shell32/shellpath.c +++ b/dlls/shell32/shellpath.c @@ -951,13 +951,12 @@ static const WCHAR Videos_Sample_VideosW[] = {'V','i','d','e','o','s','\','S',' static const WCHAR WindowsW[] = {'W','i','n','d','o','w','s',0}; static const WCHAR Windows_Sidebar_GadgetsW[] = {'W','i','n','d','o','w','s',' ','S','i','d','e','b','a','r','\','G','a','d','g','e','t','s',0}; static const WCHAR DefaultW[] = {'.','D','e','f','a','u','l','t','\0'}; -static const WCHAR AllUsersProfileW[] = {'%','A','L','L','U','S','E','R','S','P','R','O','F','I','L','E','%','\0'}; +static const WCHAR AllUsersProfileW[] = {'%','P','U','B','L','I','C','%',0}; static const WCHAR UserProfileW[] = {'%','U','S','E','R','P','R','O','F','I','L','E','%','\0'}; static const WCHAR ProgramDataVarW[] = {'%','P','r','o','g','r','a','m','D','a','t','a','%','\0'}; static const WCHAR SystemDriveW[] = {'%','S','y','s','t','e','m','D','r','i','v','e','%','\0'}; static const WCHAR ProfileListW[] = {'S','o','f','t','w','a','r','e','\','M','i','c','r','o','s','o','f','t','\','W','i','n','d','o','w','s',' ','N','T','\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\','P','r','o','f','i','l','e','L','i','s','t',0}; static const WCHAR ProfilesDirectoryW[] = {'P','r','o','f','i','l','e','s','D','i','r','e','c','t','o','r','y',0}; -static const WCHAR AllUsersProfileValueW[] = {'A','l','l','U','s','e','r','s','P','r','o','f','i','l','e','\0'}; static const WCHAR szSHFolders[] = {'S','o','f','t','w','a','r','e','\','M','i','c','r','o','s','o','f','t','\','W','i','n','d','o','w','s','\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\','E','x','p','l','o','r','e','r','\','S','h','e','l','l',' ','F','o','l','d','e','r','s','\0'}; static const WCHAR szSHUserFolders[] = {'S','o','f','t','w','a','r','e','\','M','i','c','r','o','s','o','f','t','\','W','i','n','d','o','w','s','\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\','E','x','p','l','o','r','e','r','\','U','s','e','r',' ','S','h','e','l','l',' ','F','o','l','d','e','r','s','\0'}; static const WCHAR szDefaultProfileDirW[] = {'u','s','e','r','s',0}; @@ -3806,11 +3805,13 @@ static HRESULT _SHExpandEnvironmentStrings(LPCWSTR szSrc, LPWSTR szDest) { if (!strncmpiW(szTemp, AllUsersProfileW, strlenW(AllUsersProfileW))) { - WCHAR szAllUsers[MAX_PATH]; + WCHAR szAllUsers[MAX_PATH], def_val[MAX_PATH];
- strcpyW(szDest, szProfilesPrefix); - hr = _SHGetProfilesValue(key, AllUsersProfileValueW, - szAllUsers, AllUsersW); + GetSystemDirectoryW(def_val, MAX_PATH); + if (def_val[1] == ':') strcpyW( def_val + 3, UsersPublicW ); + else FIXME("non-drive system paths unsupported\n"); + + hr = _SHGetProfilesValue(key, PublicW, szAllUsers, def_val); PathAppendW(szDest, szAllUsers); PathAppendW(szDest, szTemp + strlenW(AllUsersProfileW)); }
Dmitry Timoshkov dmitry@baikal.ru writes:
This matches what recent Windows versions set in the process environment.
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru
dlls/shell32/shellpath.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
This breaks the tests:
../../../tools/runtest -q -P wine -T ../../.. -M userenv.dll -p userenv_test.exe.so userenv && touch userenv.ok userenv.c:183: Test failed: Expected 1, got 0 for ALLUSERSPROFILE (0) userenv.c:183: Test failed: Expected 1, got 0 for ALLUSERSPROFILE (1) make: *** [Makefile:184: userenv.ok] Error 2