diff options
Diffstat (limited to 'apt-pkg/acquire-item.cc')
-rw-r--r-- | apt-pkg/acquire-item.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 1ff3e32dc..604a2e07e 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -1545,10 +1545,13 @@ void pkgAcqMetaBase::AbortTransaction() if ((*I)->Status == pkgAcquire::Item::StatIdle) (*I)->Status = pkgAcquire::Item::StatDone; - // kill files in partial - std::string const PartialFile = GetPartialFileName(flNotDir((*I)->DestFile)); - if(FileExists(PartialFile)) - Rename(PartialFile, PartialFile + ".FAILED"); + // kill failed files in partial + if ((*I)->Status == pkgAcquire::Item::StatError) + { + std::string const PartialFile = GetPartialFileName(flNotDir((*I)->DestFile)); + if(FileExists(PartialFile)) + Rename(PartialFile, PartialFile + ".FAILED"); + } } } /*}}}*/ |