http://issues.apache.org/SpamAssassin/show_bug.cgi?id=4941





------- Additional Comments From [EMAIL PROTECTED]  2006-07-21 18:02 -------
(In reply to comment #7)
> oh wait a sec -- I get your point.  UPDTmp is under 'updatedir', rather than
> UPDDir, and that's the dir that Mail::SpamAssassin checks for -- so even with
> this additional code, it'll still try to use the empty dir (even with just 
> temp
> files in it).

Yes!  Right, sorry -- wasn't quite awake yet so that previous comment was a bit
off, but the idea got through! :)

> good point. :(  ok -- we need an additional fix.
> 
> I suggest using 
> '__local_state_dir__/spamassassin/__version__.tmp/$nicechannel'
> as the temp dir for 
> '__local_state_dir__/spamassassin/__version__/$nicechannel'.
>  sound good?

I think you mean:

__local_state_dir__.tmp/$nicechannel

since __local_state_dir__ includes "spamassassin/__version__".  :)


I've been thinking about this for a bit (just haven't had a chance to code up a
patch) and what I ended up with is something like this:

- If exists, read in MIRRORED.BY and track the mtime.  Otherwise download a new
one and flag that it was downloaded.
- Create UPDTmp under File::Spec->tmpdir()
- Unarchive the update to UPDTmp, test it, and remove the directory.
- If error, throw error and go onto next channel.
- Clean out $UPDDir or make it if necessary (at this point local_state_dir 
exists)
- Unarchive the update to UPDDir
- If not downloaded, check for a new MIRRORED.BY file
- Write out MIRRORED.BY file

I think this minimizes the possibility of this problem occuring.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to