]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/clean.cc
testcases runable as root
[apt.git] / apt-pkg / clean.cc
index 0ee3b765d4ebf49c292b41c8f8b568e41b82c238..6edce5b6db0edf3e57759dc3f8a20055ccac8c21 100644 (file)
 bool pkgArchiveCleaner::Go(std::string Dir,pkgCache &Cache)
 {
    bool CleanInstalled = _config->FindB("APT::Clean-Installed",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());
@@ -128,3 +131,5 @@ bool pkgArchiveCleaner::Go(std::string Dir,pkgCache &Cache)
    return true;
 }
                                                                        /*}}}*/
+
+APT_CONST pkgArchiveCleaner::~pkgArchiveCleaner() {}