Commit e1f752f7 authored by Richard Cohen's avatar Richard Cohen Committed by Alexandre Julliard

Don't hardcode "windows" directory.

Make "My Pictures" etc. point to $HOME.
parent b70a5f29
......@@ -805,7 +805,7 @@ static const WCHAR szSHUserFolders[] = {'S','o','f','t','w','a','r','e','\\','M'
/* This defaults to L"Documents and Settings" on Windows 2000/XP, but we're
* acting more Windows 9x-like for now.
*/
static const WCHAR szDefaultProfileDirW[] = {'w','i','n','d','o','w','s','\\','p','r','o','f','i','l','e','s','\0'};
static const WCHAR szDefaultProfileDirW[] = {'p','r','o','f','i','l','e','s','\0'};
static const WCHAR AllUsersW[] = {'A','l','l',' ','U','s','e','r','s','\0'};
typedef enum _CSIDL_Type {
......@@ -1259,6 +1259,9 @@ static HRESULT _SHGetDefaultValue(BYTE folder, LPWSTR pszPath)
switch (folder)
{
case CSIDL_PERSONAL:
case CSIDL_MYMUSIC:
case CSIDL_MYPICTURES:
case CSIDL_MYVIDEO:
{
const char *home = getenv("HOME");
......@@ -1597,7 +1600,8 @@ static HRESULT _SHExpandEnvironmentStrings(LPCWSTR szSrc, LPWSTR szDest)
{
WCHAR szDefaultProfilesPrefix[MAX_PATH];
strcpyW(szDefaultProfilesPrefix, SystemDriveW);
GetWindowsDirectoryW(szDefaultProfilesPrefix, MAX_PATH);
PathAddBackslashW(szDefaultProfilesPrefix);
PathAppendW(szDefaultProfilesPrefix, szDefaultProfileDirW);
hr = _SHGetProfilesValue(key, ProfilesDirectoryW, szProfilesPrefix,
szDefaultProfilesPrefix);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment