]> git.saurik.com Git - apt.git/commitdiff
add missing TransactionStageCopy() in pkgAcqDiffIndex::Done()
authorMichael Vogt <mvo@ubuntu.com>
Mon, 6 Oct 2014 11:18:45 +0000 (13:18 +0200)
committerMichael Vogt <mvo@ubuntu.com>
Mon, 6 Oct 2014 11:18:45 +0000 (13:18 +0200)
apt-pkg/acquire-item.cc

index 6c04288a882b9f1ec0b40cc3d20abaee77e87c9c..975965e46d01048a1e08db427d6d053450c4115e 100644 (file)
@@ -555,21 +555,14 @@ void pkgAcqDiffIndex::Done(string Message,unsigned long long Size,HashStringList
 
    }
 
+   if(!ParseDiffIndex(DestFile))
+      return Failed("", NULL);
+
+   // queue for final move
    string FinalFile;
    FinalFile = _config->FindDir("Dir::State::lists")+URItoFileName(RealURI);
-
-   // success in downloading the index
-   // rename the index
    FinalFile += string(".IndexDiff");
-   if(Debug)
-      std::clog << "Renaming: " << DestFile << " -> " << FinalFile 
-               << std::endl;
-   Rename(DestFile,FinalFile);
-   chmod(FinalFile.c_str(),0644);
-   DestFile = FinalFile;
-
-   if(!ParseDiffIndex(DestFile))
-      return Failed("", NULL);
+   TransactionManager->TransactionStageCopy(this, DestFile, FinalFile);
 
    Complete = true;
    Status = StatDone;