// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: acquire-item.cc,v 1.29 1999/04/28 22:48:44 jgg Exp $
+// $Id: acquire-item.cc,v 1.33 1999/07/10 05:32:25 jgg Exp $
/* ######################################################################
Acquire Item - Item to acquire
if (Owner->Log != 0)
Owner->Log->Fetched(Size,atoi(LookupTag(Message,"Resume-Point","0").c_str()));
}
+
+ if (FileSize == 0)
+ FileSize= Size;
Status = StatDone;
ErrorText = string();
/* */
void pkgAcqIndexRel::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
{
- // This is the retry counter
if (Cnf->LocalOnly == true ||
StringToBool(LookupTag(Message,"Transient-Failure"),false) == false)
{
if (Md5Hash != MD5)
{
_error->Error("MD5Sum mismatch for package %s",Version.ParentPkg().Name());
- Rename(DestFile + ".FAILED",DestFile);
+ Rename(DestFile,DestFile + ".FAILED");
return;
}
}
}
}
/*}}}*/
+// AcqArchive::Finished - Fetching has finished, tidy up /*{{{*/
+// ---------------------------------------------------------------------
+/* */
+void pkgAcqArchive::Finished()
+{
+ if (Status == pkgAcquire::Item::StatDone &&
+ Complete == true)
+ return;
+ StoreFilename = string();
+}
+ /*}}}*/
// AcqFile::pkgAcqFile - Constructor /*{{{*/
// ---------------------------------------------------------------------