- Straighten out some confusion on versions, RFC 822 dates,

etc. on news and unsigned updates. Stored versions are always
  Long.toString(modtime). Only convert to RFC 822 for eepget or display.
This commit is contained in:
zzz
2012-10-17 23:45:44 +00:00
parent b9d717b9f9
commit f9b8f0528d
4 changed files with 52 additions and 27 deletions

View File

@@ -60,8 +60,10 @@ class UnsignedUpdateRunner extends UpdateRunner {
public void transferComplete(long alreadyTransferred, long bytesTransferred, long bytesRemaining, String url, String outputFile, boolean notModified) {
String lastmod = _get.getLastModified();
File tmp = new File(_updateFile);
/////// FIXME RFC822 or long?
if (_mgr.notifyComplete(this, lastmod, tmp))
long modtime = RFC822Date.parse822Date(lastmod);
if (modtime <= 0)
modtime = _context.clock().now();
if (_mgr.notifyComplete(this, Long.toString(modtime), tmp))
this.done = true;
else
tmp.delete(); // corrupt