pan-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pan-devel] Getting Started with Pan Development


From: K. Haley
Subject: Re: [Pan-devel] Getting Started with Pan Development
Date: Sun, 17 Apr 2005 23:11:30 -0600
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

Greg Breland wrote:

I want to add detection for full hard disk to Pan.  I'm thinking of
something along the lines of if the available space is less than the X
bytes then freeze downloading until more space becomes available.

If someone could point me to the bits of code I should be looking at I
would appreciate it.  task-save.c was my first thought, but it doesn't
seem to contain what I'm looking for.


Hi Greg,
   Since you mention task-save.c I assume you mean when downloading an
article into the cache.  If so then you want base/acache.c.  In the
function that adds an article to the cache check for a failure to write
the file.  If that happens simply clear about 10% of the cache.  There
is some code in place to do this when the cache has reached its maximum
size, you just need to do it for the disk full case.  The reason for
doing it this way is in case a user has the cache on an expanding
volume, I forget what it's called.  I don't know if finding the free
space would take the expansion into account.

P.S.  Thanks for reminding me about this.  I didn't even think about it
when I coded the DB version.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]