Two File /r commands should work again
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2513 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
aae7a27d27
commit
b3308d1d7f
2 changed files with 5 additions and 8 deletions
|
@ -94,7 +94,7 @@ class CEXEBuild {
|
||||||
void ps_addtoline(const char *str, GrowBuf &linedata, StringList &hist);
|
void ps_addtoline(const char *str, GrowBuf &linedata, StringList &hist);
|
||||||
int doParse(const char *str, FILE *fp, const char *curfilename, int *lineptr);
|
int doParse(const char *str, FILE *fp, const char *curfilename, int *lineptr);
|
||||||
int doCommand(int which_token, LineParser &line, FILE *fp, const char *curfilename, int *lineptr);
|
int doCommand(int which_token, LineParser &line, FILE *fp, const char *curfilename, int *lineptr);
|
||||||
int do_add_file(const char *lgss, int attrib, int recurse, int linecnt, int *total_files, const char *name_override=0, int generatecode=1, int *data_handle=0);
|
int do_add_file(const char *lgss, int attrib, int recurse, int linecnt, int *total_files, const char *name_override=0, int generatecode=1, int *data_handle=0, int rec_depth=0);
|
||||||
GrowBuf m_linebuild; // used for concatenating lines
|
GrowBuf m_linebuild; // used for concatenating lines
|
||||||
|
|
||||||
void ERROR_MSG(const char *s, ...);
|
void ERROR_MSG(const char *s, ...);
|
||||||
|
|
|
@ -4359,7 +4359,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NSIS_SUPPORT_FILE
|
#ifdef NSIS_SUPPORT_FILE
|
||||||
int CEXEBuild::do_add_file(const char *lgss, int attrib, int recurse, int linecnt, int *total_files, const char *name_override, int generatecode, int *data_handle)
|
int CEXEBuild::do_add_file(const char *lgss, int attrib, int recurse, int linecnt, int *total_files, const char *name_override, int generatecode, int *data_handle, int rec_depth)
|
||||||
{
|
{
|
||||||
char dir[1024];
|
char dir[1024];
|
||||||
char newfn[1024];
|
char newfn[1024];
|
||||||
|
@ -4530,9 +4530,6 @@ int CEXEBuild::do_add_file(const char *lgss, int attrib, int recurse, int linecn
|
||||||
|
|
||||||
if (recurse)
|
if (recurse)
|
||||||
{
|
{
|
||||||
static int counter;
|
|
||||||
int thiscounter=counter++;
|
|
||||||
|
|
||||||
int a=GetFileAttributes(lgss);
|
int a=GetFileAttributes(lgss);
|
||||||
const char *fspec=lgss+strlen(dir)+!!dir[0];
|
const char *fspec=lgss+strlen(dir)+!!dir[0];
|
||||||
strcpy(newfn,lgss);
|
strcpy(newfn,lgss);
|
||||||
|
@ -4544,7 +4541,7 @@ int CEXEBuild::do_add_file(const char *lgss, int attrib, int recurse, int linecn
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// we don't want to include a whole directory if it's not the first call
|
// we don't want to include a whole directory if it's not the first call
|
||||||
if (thiscounter) return PS_OK;
|
if (rec_depth) return PS_OK;
|
||||||
fspec="*.*";
|
fspec="*.*";
|
||||||
}
|
}
|
||||||
if (a&FILE_ATTRIBUTE_DIRECTORY)
|
if (a&FILE_ATTRIBUTE_DIRECTORY)
|
||||||
|
@ -4624,7 +4621,7 @@ int CEXEBuild::do_add_file(const char *lgss, int attrib, int recurse, int linecn
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
a=do_add_file(spec,attrib,recurse,linecnt,total_files,NULL,generatecode);
|
a=do_add_file(spec,attrib,recurse,linecnt,total_files,NULL,generatecode,data_handle,rec_depth+1);
|
||||||
if (a != PS_OK)
|
if (a != PS_OK)
|
||||||
{
|
{
|
||||||
FindClose(h);
|
FindClose(h);
|
||||||
|
@ -4638,7 +4635,7 @@ int CEXEBuild::do_add_file(const char *lgss, int attrib, int recurse, int linecn
|
||||||
} while (FindNextFile(h,&d));
|
} while (FindNextFile(h,&d));
|
||||||
FindClose(h);
|
FindClose(h);
|
||||||
|
|
||||||
if (!thiscounter)
|
if (!rec_depth)
|
||||||
{
|
{
|
||||||
entry ent={0,};
|
entry ent={0,};
|
||||||
ent.which=EW_CREATEDIR;
|
ent.which=EW_CREATEDIR;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue