summaryrefslogtreecommitdiff
path: root/apt-pkg/policy.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2017-07-26 19:09:59 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2017-07-26 19:09:59 +0200
commit2920e9428e26004f90a1f1ea86f07850b2204f85 (patch)
tree601b38dc82e987ad0ed141caa31b480e6f6fb4ca /apt-pkg/policy.cc
parentf2f8e89f08cdf01c83a0b8ab053c65329d85ca90 (diff)
parent8580574ec63fedd39a3ab3b9f0025e08eae5f620 (diff)
Merge branch 'feature/authconf'
Diffstat (limited to 'apt-pkg/policy.cc')
-rw-r--r--apt-pkg/policy.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc
index 008c98ecb..030bab26b 100644
--- a/apt-pkg/policy.cc
+++ b/apt-pkg/policy.cc
@@ -324,10 +324,10 @@ bool ReadPinDir(pkgPolicy &Plcy,string Dir)
return false;
// Read the files
+ bool good = true;
for (vector<string>::const_iterator I = List.begin(); I != List.end(); ++I)
- if (ReadPinFile(Plcy, *I) == false)
- return false;
- return true;
+ good = ReadPinFile(Plcy, *I) && good;
+ return good;
}
/*}}}*/
// ReadPinFile - Load the pin file into a Policy /*{{{*/
@@ -343,8 +343,11 @@ bool ReadPinFile(pkgPolicy &Plcy,string File)
if (RealFileExists(File) == false)
return true;
-
- FileFd Fd(File,FileFd::ReadOnly);
+
+ FileFd Fd;
+ if (OpenConfigurationFileFd(File, Fd) == false)
+ return false;
+
pkgTagFile TF(&Fd, pkgTagFile::SUPPORT_COMMENTS);
if (Fd.IsOpen() == false || Fd.Failed())
return false;