diff options
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/indexcopy.cc | 10 |
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); |