diff options
author | Robin Appelman <robin@icewind.nl> | 2022-02-16 15:23:52 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2022-03-04 15:49:00 +0100 |
commit | 5b77099612286061f8a48618ffa513dcf6aa4c31 (patch) | |
tree | 9507945e5686f41c5b08ee144195babc3c892a42 /apps | |
parent | 69a6efba477685f0f0c66c06d06ae27675acbf96 (diff) | |
download | nextcloud-server-5b77099612286061f8a48618ffa513dcf6aa4c31.tar.gz nextcloud-server-5b77099612286061f8a48618ffa513dcf6aa4c31.zip |
handle invilid type when listing directory in smb
just handle it as an empty directory
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_external/lib/Lib/Storage/SMB.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/files_external/lib/Lib/Storage/SMB.php b/apps/files_external/lib/Lib/Storage/SMB.php index 28a2d6de7cc..78918343cee 100644 --- a/apps/files_external/lib/Lib/Storage/SMB.php +++ b/apps/files_external/lib/Lib/Storage/SMB.php @@ -43,6 +43,7 @@ use Icewind\SMB\Exception\ConnectException; use Icewind\SMB\Exception\Exception; use Icewind\SMB\Exception\ForbiddenException; use Icewind\SMB\Exception\InvalidArgumentException; +use Icewind\SMB\Exception\InvalidTypeException; use Icewind\SMB\Exception\NotFoundException; use Icewind\SMB\Exception\OutOfSpaceException; use Icewind\SMB\Exception\TimedOutException; @@ -241,6 +242,8 @@ class SMB extends Common implements INotifyStorage { } catch (ForbiddenException $e) { $this->logger->critical($e->getMessage(), ['exception' => $e]); throw new NotPermittedException(); + } catch (InvalidTypeException $e) { + return; } foreach ($files as $file) { $this->statCache[$path . '/' . $file->getName()] = $file; |