diff options
author | Michael Vogt <mvo@ubuntu.com> | 2014-10-06 13:18:45 +0200 |
---|---|---|
committer | Michael Vogt <mvo@ubuntu.com> | 2014-10-06 13:18:45 +0200 |
commit | 22b2ef9d29b8a467c0fca8637636e417e020e2f5 (patch) | |
tree | b8dc031a3af831b7af3150d5055891dcbefb0f9f | |
parent | f30976478e684fc19e48d71881805454ceb6ecae (diff) |
add missing TransactionStageCopy() in pkgAcqDiffIndex::Done()
-rw-r--r-- | apt-pkg/acquire-item.cc | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 6c04288a8..975965e46 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -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; |