зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
2998ae70b6
Коммит
3acbae42ae
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче