X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/74b220028595342028e3309002e4ec359af328f9..1abbc47c045770476f5f9a57c58989d13290d51b:/apt-pkg/acquire.cc?ds=sidebyside diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index 3a547fb3a..cdc3fba4b 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -447,6 +447,10 @@ pkgAcquire::Worker *pkgAcquire::WorkerStep(Worker *I) if it is part of the download set. */ bool pkgAcquire::Clean(string Dir) { + // non-existing directories are by definition clean… + if (DirectoryExists(Dir) == false) + return true; + DIR *D = opendir(Dir.c_str()); if (D == 0) return _error->Errno("opendir",_("Unable to read %s"),Dir.c_str());