nsb@THUMPER.BELLCORE.COM (Nathaniel Borenstein) (11/28/89)
If you scavenge a directory in which there are several orphan files, it doesn't sort them before adding them to the .MS_MsgDir file. This isn't so bad for the routine scavenge to pick up file system glitches, but it could be really annoying in the case of a site that uses a large periodic scavenging daemon to make a netnews database readable with AMS. The solution is pretty easy. The place to fix it is in that in ams/libs/ms/rawdb.c, around line 1654, in the procedure "CheckCheckLists". The key thing is that when Orphans.Used is > 0, it is going to add some messages that were in the directory but not in the .MS_MsgDir file. Right before doing so, it *sorts* them -- the right thing to do -- allegedly by "times". However, it is simply using the file name as a base64 timestampm -- not a great assumption to begin with, but especially bad for the "alien" (e.g. netnews) case. The solution is to replace this qsort call with one that really sorts based on the modtime of the orphan files. Should be a pretty easy fix. It doesn't solve the "scavenge" problem reported on info-andrew, but it should be fixed before it causes problems of its own. -- Nathaniel