[net.notes] bug in archiver

root@uo-vax1.UUCP (01/21/84)

#N:uo-vax1:11900002:004:1613
uo-vax1!root    Jan 13 14:37:00 1984

This seems to be the place to report notes bugs, if someone thinks
it should go elsewhere let me know and I'll repost it to the appropriate
group.  This may have been reported sometime in the past, but it hasn't 
in the last 6-8 months, so here it is.


There appears to be a bug in archiver.c.  If you say `nfarchive -nn`
where nn >= OLDGROUP all your notesfiles get deleted!!  The problem
is that the check for group expiration doesn't look at OLDGROUP, but
rather (OLDGROUP - daysold) where daysold would equal nn in the above
incantation.

The fix is simple:

change line 137 archiver.c from
    if (current - buf.st_mtime > 60*60*24*(OLDGROUP-daysold)) {
to
    if (current - buf.st_mtime > 60*60*24*OLDGROUP) {

The default for daysold is ARCHTIME which is 14, the default for OLDGROUP
is 30, so OLDGROUP-daysold = 16 by default.  This means that notesfiles
are empty before being removed.  If you give the command mentioned above
the program will leave nn days worth of notes, but then trash your 
notesfile.  

We recently purchased a new disk which allowed us to keep notesfiles longer.
You could say that I was quite surprised when, after changing the archiving
time to 30 days, people starting asking me what happened to the notesfiles!


Also, we often times wonder if our notes ever make it very far as when we
have ever requested anything the only people that have acknowledged our 
requests were local.  If people out in the distance receives this (Cal, Ill,
NJ, etc) would you please send mail acknowledging it.

Thanks,

Mark Aitken
University of Oregon
{hp-pcd,hp-cvd,tektronix}!uoregon!marka