Fix download tag directory not clean

This commit is contained in:
Michiel Broek 2004-05-08 14:55:40 +00:00
parent c998a25de1
commit df2eba102a
2 changed files with 8 additions and 1 deletions

View File

@ -68,6 +68,8 @@ v0.51.4 11-Apr-2004
wrong line terminaters (Sempoint). wrong line terminaters (Sempoint).
Added new experimental files database code which will only be Added new experimental files database code which will only be
used if configured with --enable-experiment. used if configured with --enable-experiment.
The users tag directory wasn't properly cleaned before a new
download session.
mball: mball:
Added new experimental files database code which will only be Added new experimental files database code which will only be

View File

@ -224,7 +224,12 @@ void Download(void)
Enter(2); Enter(2);
OldArea = iAreaNumber; OldArea = iAreaNumber;
WhosDoingWhat(DOWNLOAD, NULL); WhosDoingWhat(DOWNLOAD, NULL);
execute_pth((char *)"rm", (char *)"-f ./tag/*", (char *)"/dev/null", (char *)"/dev/null", (char *)"/dev/null"); temp = calloc(PATH_MAX, sizeof(char));
sprintf(temp, "-rf %s/%s/tag", CFG.bbs_usersdir, exitinfo.Name);
execute_pth((char *)"rm", temp, (char *)"/dev/null", (char *)"/dev/null", (char *)"/dev/null");
sprintf(temp, "%s/%s/tag", CFG.bbs_usersdir, exitinfo.Name);
CheckDir(temp);
free(temp);
if ((tf = fopen("taglist", "r+")) == NULL) { if ((tf = fopen("taglist", "r+")) == NULL) {
Syslog('+', "Download command but no files marked"); Syslog('+', "Download command but no files marked");