From 448eaf8b5999b6866237a069d678337b647968c4 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 6 May 2010 11:55:54 +0200 Subject: convert FileExists to DirectoryExists to check if the path is really a directory (and to have a better method name in the error message if not) --- apt-pkg/policy.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-pkg/policy.cc') diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc index 479cf3935..922efb0dd 100644 --- a/apt-pkg/policy.cc +++ b/apt-pkg/policy.cc @@ -291,9 +291,9 @@ bool ReadPinDir(pkgPolicy &Plcy,string Dir) if (Dir.empty() == true) Dir = _config->FindDir("Dir::Etc::PreferencesParts"); - if (FileExists(Dir) == false) + if (DirectoryExists(Dir) == false) { - _error->WarningE("FileExists",_("Unable to read %s"),Dir.c_str()); + _error->WarningE("DirectoryExists",_("Unable to read %s"),Dir.c_str()); return true; } -- cgit v1.2.3