From 365f5e425fc1c1c877d2b75164d16b292abd1b20 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Fri, 1 Oct 2021 17:54:27 +0200 Subject: [PATCH] Add additional logging on SMB failure to read folder content Currently we discard the error comming from the SMB library and create a new exception for nextcloud. This patch makes sure that the access/permission exception from the SMB library are logged correctly. Signed-off-by: Carl Schwan --- apps/files_external/lib/Lib/Storage/SMB.php | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/files_external/lib/Lib/Storage/SMB.php b/apps/files_external/lib/Lib/Storage/SMB.php index c9d078631b819..28a2d6de7cc27 100644 --- a/apps/files_external/lib/Lib/Storage/SMB.php +++ b/apps/files_external/lib/Lib/Storage/SMB.php @@ -239,6 +239,7 @@ protected function getFolderContents($path): iterable { try { $files = $this->share->dir($path); } catch (ForbiddenException $e) { + $this->logger->critical($e->getMessage(), ['exception' => $e]); throw new NotPermittedException(); } foreach ($files as $file) {