summaryrefslogtreecommitdiff
path: root/apt-pkg/indexcopy.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-09-03 20:22:15 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-09-03 20:22:15 +0200
commit5b777e8f77c946e9502e7f855ff1c196ee5b85b6 (patch)
tree665964623c5642644a6e66e4d9e4bd95daaf5a15 /apt-pkg/indexcopy.cc
parent0205540433440a9ff4ad4ea4cce44c700a4b401c (diff)
parent24e936625600312682a34872a2425f3382f3df2f (diff)
* apt-pkg/indexcopy.cc:
- only use trusted.gpg.d directory if it exists
Diffstat (limited to 'apt-pkg/indexcopy.cc')
-rw-r--r--apt-pkg/indexcopy.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc
index a2a1d5934..fb33ed461 100644
--- a/apt-pkg/indexcopy.cc
+++ b/apt-pkg/indexcopy.cc
@@ -673,9 +673,13 @@ bool SigVerify::RunGPGV(std::string const &File, std::string const &FileGPG,
std::clog << "Keyring path: " << trustedPath << std::endl;
}
- std::vector<string> keyrings = GetListOfFilesInDir(trustedPath, "gpg", false);
- if (FileExists(trustedFile) == true)
- keyrings.push_back(trustedFile);
+ std::vector<string> keyrings;
+ if (DirectoryExists(trustedPath))
+ {
+ keyrings = GetListOfFilesInDir(trustedPath, "gpg", false, true);
+ if (FileExists(trustedFile) == true)
+ keyrings.push_back(trustedFile);
+ }
std::vector<const char *> Args;
Args.reserve(30);