]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire.cc
fix foldmarker in algorithms.h
[apt.git] / apt-pkg / acquire.cc
index 3a547fb3a843e54056d1e10336bbe2bd79efea62..cdc3fba4b8059994fa3251953d159a102830569b 100644 (file)
@@ -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());