only free the PIDL in DirProc, don't parse it too so g_tmp gets overwritten with the entire path instaed of just the display name

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3472 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2004-02-06 22:37:46 +00:00
parent 80c8c38055
commit 4a8e19199a
3 changed files with 11 additions and 12 deletions

View file

@ -855,17 +855,17 @@ static BOOL CALLBACK DirProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
idlist = SHBrowseForFolder(&bi);
if (idlist)
{
// Get and free idlist
my_PIDL2Path(g_tmp, idlist);
// free idlist
FreePIDL(idlist);
if (g_header->install_directory_auto_append)
{
const char *post_str=ps_tmpbuf;
const char *post_str = ps_tmpbuf;
GetNSISStringTT(g_header->install_directory_auto_append);
// name gives just the folder name
if (lstrcmpi(post_str,g_tmp))
// display name gives just the folder name
if (lstrcmpi(post_str, g_tmp))
{
lstrcat(addtrailingslash(dir),post_str);
lstrcat(addtrailingslash(dir), post_str);
}
}