summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-09-13 18:00:22 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-09-13 18:00:22 +0200
commitafd7b358f94efddb83a2911ec1a21e7280074b1e (patch)
treefaa658f29d7dff42c6ed475037dd462384eab46e /apt-pkg/acquire.cc
parent74b220028595342028e3309002e4ec359af328f9 (diff)
parent4e9108b8238438f1c390cb9ea9de598de1b7d7cb (diff)
merge with debian/sid
Diffstat (limited to 'apt-pkg/acquire.cc')
-rw-r--r--apt-pkg/acquire.cc4
1 files changed, 4 insertions, 0 deletions
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());