Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2022-02-16 17:23:52 +0300
committerRobin Appelman <robin@icewind.nl>2022-03-04 17:49:00 +0300
commit5b77099612286061f8a48618ffa513dcf6aa4c31 (patch)
tree9507945e5686f41c5b08ee144195babc3c892a42 /apps/files_external
parent69a6efba477685f0f0c66c06d06ae27675acbf96 (diff)
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/files_external')
-rw-r--r--apps/files_external/lib/Lib/Storage/SMB.php3
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;