Explorar o código

* fix in the log class to avoid absurdely big downloads

Michael Vogt %!s(int64=20) %!d(string=hai) anos
pai
achega
8f30ca302e
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      apt-pkg/acquire-item.cc

+ 2 - 1
apt-pkg/acquire-item.cc

@@ -103,7 +103,8 @@ void pkgAcquire::Item::Done(string Message,unsigned long Size,string,
 {
 {
    // We just downloaded something..
    // We just downloaded something..
    string FileName = LookupTag(Message,"Filename");
    string FileName = LookupTag(Message,"Filename");
-   if (Complete == false && FileName == DestFile)
+   // we only inform the Log class if it was actually not a local thing
+   if (Complete == false && !Local && FileName == DestFile)
    {
    {
       if (Owner->Log != 0)
       if (Owner->Log != 0)
 	 Owner->Log->Fetched(Size,atoi(LookupTag(Message,"Resume-Point","0").c_str()));
 	 Owner->Log->Fetched(Size,atoi(LookupTag(Message,"Resume-Point","0").c_str()));