]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire.cc
Merge remote-tracking branch 'upstream/debian/experimental' into feature/acq-trans
[apt.git] / apt-pkg / acquire.cc
index 57cbba169ec5cd66ea01d4f521dbfc985d3b6772..9060d492b8d5bce46a98d795219455b8bb05b3d2 100644 (file)
@@ -37,6 +37,7 @@
 #include <sys/time.h>
 #include <sys/select.h>
 #include <errno.h>
+#include <sys/stat.h>
 
 #include <apti18n.h>
                                                                        /*}}}*/
@@ -487,6 +488,9 @@ bool pkgAcquire::Clean(string Dir)
    if (DirectoryExists(Dir) == false)
       return true;
 
+   if(Dir == "/")
+      return _error->Error(_("Clean of %s is not supported"), Dir.c_str());
+
    DIR *D = opendir(Dir.c_str());   
    if (D == 0)
       return _error->Errno("opendir",_("Unable to read %s"),Dir.c_str());