[SHELL32] Shell Profile Folders fixes.
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sat, 30 Jun 2018 15:43:08 +0000 (17:43 +0200)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sat, 30 Jun 2018 16:20:08 +0000 (18:20 +0200)
commit2afb483a9e1af19289a51f22000eaaa6d8d8f333
treeb4587a9bc093d207c6d60081608f7cb6ff5cb39c
parent6abc9f5b5af6cc7b7c57ff9c6bcc4a919cf85d1e
[SHELL32] Shell Profile Folders fixes.

- Fix a regression introduced in r65415 (1795a3bf) where the directory
  paths stored in "Windows\CurrentVersion\Explorer\User Shell Folders"
  were stored in expanded format instead of in unexpanded format:
  _SHGetDefaultValue() *MUST* return unexpanded paths by design!!

- Augment _SHExpandEnvironmentStrings() and _SHGetUserShellFolderPath()
  to take a user token handle to be able to correctly resolve/expand
  user-specific directory paths.

- Fix _SHExpandEnvironmentStrings() so that it always retrieve the
  correct current user / all-users directory paths by calling userenv
  functions, instead of hardcoding a broken logic. As a result this
  removes the "C:\Documents and Settings\SYSTEM" ghost directory we got
  during ReactOS installation.

- Delimit the changes with respect to Wine by #if(n)def __REACTOS__ .
dll/win32/shell32/wine/shellpath.c