summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-08-22 23:08:16 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-08-22 23:08:16 +0200
commit95b5f6c19d361745c4e11b214f0f07ad10c9b5b3 (patch)
tree507966b581536a11acd5c87bfcf4fc8a276d845f /apt-pkg
parent1207cf3f9bd77664d6b7de9b8a7fdd33c0bed23a (diff)
* apt-pkg/acquire.cc:
- non-existing directories are by definition clean
Diffstat (limited to 'apt-pkg')
-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 a2da196be..ef120d8e9 100644
--- a/apt-pkg/acquire.cc
+++ b/apt-pkg/acquire.cc
@@ -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());