Bug 241282 When choosing an alternative location via "Browse...", the Installer "defaults" to ns_temp subfolder patch by <jhenry@ccs.neu.edu> r+a=benjamin

This commit is contained in:
masayuki%d-toybox.com 2005-06-24 15:38:01 +00:00
Родитель 2998ae70b6
Коммит 3acbae42ae
1 изменённых файлов: 14 добавлений и 11 удалений

Просмотреть файл

@ -613,19 +613,22 @@ int CALLBACK BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpDa
void BrowseForDirectory(HWND hParent)
{
LPITEMIDLIST itemIDList;
BROWSEINFO browseInfo;
LPITEMIDLIST itemIDList;
BROWSEINFO browseInfo;
char currDir[MAX_PATH];
GetCurrentDirectory(MAX_PATH, currDir);
browseInfo.hwndOwner = hParent;
browseInfo.pidlRoot = NULL;
browseInfo.pszDisplayName = currDir;
browseInfo.lpszTitle = sgInstallGui.szBrowseInfo;
browseInfo.ulFlags = BIF_USENEWUI | BIF_RETURNONLYFSDIRS;
browseInfo.lpfn = NULL;
browseInfo.lParam = 0;
if(SHGetSpecialFolderLocation(hParent, CSIDL_PROGRAM_FILES, &itemIDList) == S_OK)
SHGetPathFromIDList(itemIDList, (LPTSTR) currDir);
else
strncpy(currDir, "C:\\", sizeof(currDir));
browseInfo.hwndOwner = hParent;
browseInfo.pidlRoot = NULL;
browseInfo.pszDisplayName = currDir;
browseInfo.lpszTitle = sgInstallGui.szBrowseInfo;
browseInfo.ulFlags = BIF_USENEWUI | BIF_RETURNONLYFSDIRS;
browseInfo.lpfn = NULL;
browseInfo.lParam = 0;
if (currDir[0]) {
browseInfo.lParam = (LPARAM) strdup(currDir);