mirror of
https://github.com/nextcloud/server.git
synced 2026-04-26 00:27:49 -04:00
log failures to read certificates during listing
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
7073c21e2d
commit
6d881c10e8
1 changed files with 7 additions and 1 deletions
|
|
@ -83,8 +83,14 @@ class CertificateManager implements ICertificateManager {
|
|||
while (false !== ($file = readdir($handle))) {
|
||||
if ($file != '.' && $file != '..') {
|
||||
try {
|
||||
$result[] = new Certificate($this->view->file_get_contents($path . $file), $file);
|
||||
$content = $this->view->file_get_contents($path . $file);
|
||||
if ($content !== false) {
|
||||
$result[] = new Certificate($content, $file);
|
||||
} else {
|
||||
$this->logger->error("Failed to read certificate from $path");
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
$this->logger->error("Failed to read certificate from $path", ['exception' => $e]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue