]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire.cc
Do not crash for apt-get install /dev/null
[apt.git] / apt-pkg / acquire.cc
index 57cbba169ec5cd66ea01d4f521dbfc985d3b6772..8467dab5b6086e1c2fe018debe36ab0d748dcd27 100644 (file)
@@ -487,6 +487,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());