apt-pkg/policy.cc: it is ok, if default PinDir doesn't exist

Reported-by: rider@
This commit is contained in:
Gleb Fotengauer-Malinovskiy 2014-07-03 18:53:10 +04:00
parent 6e29b2fe58
commit 02a55b051d

View File

@ -306,7 +306,11 @@ signed short pkgPolicy::GetPkgPriority(const pkgCache::PkgIterator &Pkg)
bool ReadPinDir(pkgPolicy &Plcy,string Dir) bool ReadPinDir(pkgPolicy &Plcy,string Dir)
{ {
if (Dir.empty() == true) if (Dir.empty() == true)
{
Dir = _config->FindDir("Dir::Etc::PreferencesParts"); Dir = _config->FindDir("Dir::Etc::PreferencesParts");
if (FileExists(Dir) == false)
return true;
}
DIR *D = opendir(Dir.c_str()); DIR *D = opendir(Dir.c_str());
if (D == 0) if (D == 0)