- Fixed SetOutPath not setting current directory if the directory didn't exist before
- Fixed a memory leak git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2895 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
dd89dc4203
commit
aa09b6bdb9
2 changed files with 12 additions and 10 deletions
|
@ -224,23 +224,16 @@ static int NSISCALL ExecuteEntry(entry *entry_)
|
||||||
case EW_CREATEDIR: {
|
case EW_CREATEDIR: {
|
||||||
char *buf1=GetStringFromParm(-0x10);
|
char *buf1=GetStringFromParm(-0x10);
|
||||||
log_printf3("CreateDirectory: \"%s\" (%d)",buf1,parm1);
|
log_printf3("CreateDirectory: \"%s\" (%d)",buf1,parm1);
|
||||||
if (parm1)
|
|
||||||
{
|
|
||||||
update_status_text(LANG_OUTPUTDIR,buf1);
|
|
||||||
mystrcpy(state_output_directory,buf1);
|
|
||||||
SetCurrentDirectory(buf1);
|
|
||||||
}
|
|
||||||
else update_status_text(LANG_CREATEDIR,buf1);
|
|
||||||
{
|
{
|
||||||
char *tp=CharNext(buf1);
|
char *tp=CharNext(buf1);
|
||||||
char *p=buf1;
|
char *p=buf1;
|
||||||
char c = 'c';
|
char c='c';
|
||||||
if (*p) {
|
if (*p) {
|
||||||
if (*(WORD*)tp == CHAR2_TO_WORD(':','\\')) p=tp+2;
|
if (*(WORD*)tp == CHAR2_TO_WORD(':','\\')) p=tp+2;
|
||||||
else if (*(WORD*)p == CHAR2_TO_WORD('\\','\\'))
|
else if (*(WORD*)p == CHAR2_TO_WORD('\\','\\'))
|
||||||
{
|
{
|
||||||
int x;
|
int x=4;
|
||||||
for (x = 0; x < 4; x ++)
|
while (x--)
|
||||||
{
|
{
|
||||||
while (*p != '\\' && *p) p=CharNext(p); // skip host then share
|
while (*p != '\\' && *p) p=CharNext(p); // skip host then share
|
||||||
p=CharNext(p);
|
p=CharNext(p);
|
||||||
|
@ -263,6 +256,13 @@ static int NSISCALL ExecuteEntry(entry *entry_)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (parm1)
|
||||||
|
{
|
||||||
|
update_status_text(LANG_OUTPUTDIR,buf1);
|
||||||
|
mystrcpy(state_output_directory,buf1);
|
||||||
|
SetCurrentDirectory(buf1);
|
||||||
|
}
|
||||||
|
else update_status_text(LANG_CREATEDIR,buf1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EW_IFFILEEXISTS:
|
case EW_IFFILEEXISTS:
|
||||||
|
|
|
@ -179,6 +179,8 @@ int replace_icon(CResourceEditor* re, WORD wIconId, char* filename)
|
||||||
|
|
||||||
re->UpdateResource(RT_GROUP_ICON, MAKEINTRESOURCE(wIconId), MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), rsrcIconGroup, sizeof(IconGroupHeader) + igh.wCount*SIZEOF_RSRC_ICON_GROUP_ENTRY);
|
re->UpdateResource(RT_GROUP_ICON, MAKEINTRESOURCE(wIconId), MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), rsrcIconGroup, sizeof(IconGroupHeader) + igh.wCount*SIZEOF_RSRC_ICON_GROUP_ENTRY);
|
||||||
|
|
||||||
|
free(rsrcIconGroup);
|
||||||
|
|
||||||
icondata_size = iNewIconSize;
|
icondata_size = iNewIconSize;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue