diff --git a/ChangeLog b/ChangeLog index 5c194e9f..3e1eee39 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,9 @@ $Id$ v0.61.2 11-Jul-2004 + libmbse.a: + Added logging for obsolete .tic files in .flo files. + v0.61.1 20-Jun-2004 - 11-Jul-2004 diff --git a/TODO b/TODO index 7b11cf38..5f9e353b 100644 --- a/TODO +++ b/TODO @@ -63,6 +63,13 @@ newuser: L: Allow handles to be the same as the unixname. mbfido: + N: Check all .flo files for dead attachments. + + N: Check all .flo files for to old attachments. + + N: If a download file is deleted by keep # then check if the file(s) + are attached to nodes, if so delete the attachments and .tic files. + N: Count posted messages during mailscan. N: Code cleanup and make a structure in this program. Remove duplicate diff --git a/lib/attach.c b/lib/attach.c index f5e21340..de018540 100644 --- a/lib/attach.c +++ b/lib/attach.c @@ -113,8 +113,23 @@ int attach(faddr noden, char *ofile, int mode, char flavor) while (fgets(flofile, PATH_MAX -1, fp) != NULL) { Striplf(flofile); if (strncmp(flofile, thefile, strlen(thefile)) == 0) { - fclose(fp); Syslog('+', "attach: file %s already attached", ofile); + /* + * If one of the next entries in the .flo file is a .tic file + * pointing to this file, we should remove that .tic file and + * mark the entry in the .flo as sent. For the file with this + * name, a new .tic file will be added. + */ + while (fgets(flofile, PATH_MAX -1, fp) != NULL) { + Striplf(flofile); + if (strstr(flofile, (char *)".tic")) { + /* + * Check this .tic file + */ + Syslog('f', "Should check %s to be deleted", flofile); + } + } + fclose(fp); free(flofile); free(thefile); return TRUE;