]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire-item.cc
* apt-pkg/acquire-item.cc:
[apt.git] / apt-pkg / acquire-item.cc
index 752bc6a993eaed835def31268c708194cde4affd..7257f89e40fc401c453d5ba5bdb4489d39535dc5 100644 (file)
@@ -1060,12 +1060,6 @@ void pkgAcqMetaIndex::Done(string Message,unsigned long Size,string Hash,        /*{{{*
 
       // all cool, move Release file into place
       Complete = true;
-
-      string FinalFile = _config->FindDir("Dir::State::lists");
-      FinalFile += URItoFileName(RealURI);
-      Rename(DestFile,FinalFile);
-      chmod(FinalFile.c_str(),0644);
-      DestFile = FinalFile;
    }
    else
    {
@@ -1092,8 +1086,18 @@ void pkgAcqMetaIndex::Done(string Message,unsigned long Size,string Hash,        /*{{{*
          Desc.URI = "gpgv:" + SigFile;
          QueueURI(Desc);
          Mode = "gpgv";
+        return;
       }
    }
+
+   if (Complete == true)
+   {
+      string FinalFile = _config->FindDir("Dir::State::lists");
+      FinalFile += URItoFileName(RealURI);
+      Rename(DestFile,FinalFile);
+      chmod(FinalFile.c_str(),0644);
+      DestFile = FinalFile;
+   }
 }
                                                                        /*}}}*/
 void pkgAcqMetaIndex::RetrievalDone(string Message)                    /*{{{*/