Split cleanhtml into cleanhtml() and cleanhtmlPackagesFiles() for late and early cleaning respectively
This commit is contained in:
parent
452fcef5f0
commit
222691ea78
@ -1171,6 +1171,12 @@ main(int argc, char *argv[])
|
||||
|
||||
if (genheader_mode) {
|
||||
|
||||
if (mode & MODE_HTML) {
|
||||
logmsg(LOG_DEBUG,"cleanHTMLPackagesFiles - start");
|
||||
cleanHTMLPackagesFiles(configtag);
|
||||
logmsg(LOG_DEBUG,"cleanHTMLPackagesFiles - done");
|
||||
}
|
||||
|
||||
for (i = 0; i < ARCHS_MAX && configtag->arch[i]; i++) {
|
||||
|
||||
if (!quietmode)
|
||||
@ -1330,7 +1336,6 @@ main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
if (mode & MODE_HTML) {
|
||||
/* currheaderlist = headerlist; */
|
||||
logmsg(LOG_DEBUG,"cleanHTMLFiles - start");
|
||||
cleanHTMLFiles(configtag);
|
||||
logmsg(LOG_DEBUG,"cleanHTMLFiles - done");
|
||||
|
@ -21,6 +21,7 @@ int printHTMLWarnings(FILE *fout,struct configTag *configtag, struct headerSourc
|
||||
void printpkgicon(FILE *fout, struct configTag *configtag, struct headerSourceList *s);
|
||||
int generateStats(struct configTag *configtag,int arch);
|
||||
int cleanHTMLFilesInc(char* dir);
|
||||
int cleanHTMLPackagesFiles(struct configTag *ct);
|
||||
int cleanHTMLFiles(struct configTag *ct);
|
||||
int generateHTMLFiles(struct configTag *configtag,int arch);
|
||||
int generateHTML_SRPMSFiles(struct configTag *configtag);
|
||||
|
@ -1315,16 +1315,28 @@ cleanHTMLFilesInc(char* dir)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
cleanHTMLPackagesFiles(struct configTag *ct)
|
||||
{
|
||||
char dir[PATH_MAX];
|
||||
|
||||
snprintf(dir,PATH_MAX,"%spackages",ct->html_dir);
|
||||
if (cleanHTMLFilesInc(dir)) {
|
||||
logmsg(LOG_WARNING,"cannot clean %s directory",dir);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
cleanHTMLFiles(struct configTag *ct)
|
||||
{
|
||||
int s;
|
||||
char uf[PATH_MAX],dir[PATH_MAX];
|
||||
const char* clean_subdir[] = { "", "packages", "maintainers" };
|
||||
const char* clean_subdir[] = { "", "maintainers" };
|
||||
struct headerSourceList *currheadersourcelist;
|
||||
struct stat buf;
|
||||
|
||||
for (s = 0; s < 3; s++) {
|
||||
for (s = 0; s < 2; s++) {
|
||||
snprintf(dir,PATH_MAX,"%s%s",ct->html_dir,clean_subdir[s]);
|
||||
if (cleanHTMLFilesInc(dir)) {
|
||||
logmsg(LOG_WARNING,"cannot clean %s directory",dir);
|
||||
|
Loading…
Reference in New Issue
Block a user