Преглед изворни кода

* apt-pkg/acquire.cc:
- non-existing directories are by definition clean

David Kalnischkies пре 15 година
родитељ
комит
95b5f6c19d
2 измењених фајлова са 7 додато и 1 уклоњено
  1. 4 0
      apt-pkg/acquire.cc
  2. 3 1
      debian/changelog

+ 4 - 0
apt-pkg/acquire.cc

@@ -445,6 +445,10 @@ pkgAcquire::Worker *pkgAcquire::WorkerStep(Worker *I)
    if it is part of the download set. */
    if it is part of the download set. */
 bool pkgAcquire::Clean(string Dir)
 bool pkgAcquire::Clean(string Dir)
 {
 {
+   // non-existing directories are by definition clean…
+   if (DirectoryExists(Dir) == false)
+      return true;
+
    DIR *D = opendir(Dir.c_str());   
    DIR *D = opendir(Dir.c_str());   
    if (D == 0)
    if (D == 0)
       return _error->Errno("opendir",_("Unable to read %s"),Dir.c_str());
       return _error->Errno("opendir",_("Unable to read %s"),Dir.c_str());

+ 3 - 1
debian/changelog

@@ -17,8 +17,10 @@ apt (0.8.15.7) UNRELEASED; urgency=low
   * apt-pkg/acquire-item.cc:
   * apt-pkg/acquire-item.cc:
     - if no Release.gpg file is found try to verify with hashes,
     - if no Release.gpg file is found try to verify with hashes,
       but do not fail if a hash can't be found
       but do not fail if a hash can't be found
+  * apt-pkg/acquire.cc:
+    - non-existing directories are by definition clean
 
 
- -- David Kalnischkies <kalnischkies@gmail.com>  Mon, 22 Aug 2011 22:50:44 +0200
+ -- David Kalnischkies <kalnischkies@gmail.com>  Mon, 22 Aug 2011 23:07:29 +0200
 
 
 apt (0.8.15.6) unstable; urgency=low
 apt (0.8.15.6) unstable; urgency=low