]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire.cc
merged from lp:~donkult/apt/sid
[apt.git] / apt-pkg / acquire.cc
index a2da196be0bd51a6e0fa19673667d6afe180d45f..ef120d8e9c4f3a34aef7df20aeb7e32a32d8dbe9 100644 (file)
@@ -445,6 +445,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());