diff options
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/acquire.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index ac925e72e..5c195786b 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -117,6 +117,12 @@ static bool SetupAPTPartialDirectory(std::string const &grand, std::string const if (chmod(partial.c_str(), 0700) != 0) _error->WarningE("SetupAPTPartialDirectory", "chmod 0700 of directory %s failed", partial.c_str()); + _error->PushToStack(); + // remove 'old' FAILED files to stop us from collecting them for no reason + for (auto const &Failed: GetListOfFilesInDir(partial, "FAILED", false, false)) + RemoveFile("SetupAPTPartialDirectory", Failed); + _error->RevertToStack(); + return true; } bool pkgAcquire::Setup(pkgAcquireStatus *Progress, string const &Lock) |