X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/be20eef52da4b7f361333ea70a8d705a98ae779e..90d7716a474b4d172b06acfa2320fdc3d8663400:/apt-pkg/clean.cc?ds=sidebyside diff --git a/apt-pkg/clean.cc b/apt-pkg/clean.cc index 0ee3b765d..6edce5b6d 100644 --- a/apt-pkg/clean.cc +++ b/apt-pkg/clean.cc @@ -34,7 +34,10 @@ 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() {}