mirror of
https://github.com/nextcloud/server.git
synced 2026-04-24 15:53:36 -04:00
handle notfound and notpermitted error in Smb::getDirectoryContent
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
c605ef1f43
commit
e2aa283dba
1 changed files with 9 additions and 3 deletions
|
|
@ -620,9 +620,15 @@ class SMB extends Common implements INotifyStorage {
|
|||
}
|
||||
|
||||
public function getDirectoryContent($directory): \Traversable {
|
||||
$files = $this->getFolderContents($directory);
|
||||
foreach ($files as $file) {
|
||||
yield $this->getMetaDataFromFileInfo($file);
|
||||
try {
|
||||
$files = $this->getFolderContents($directory);
|
||||
foreach ($files as $file) {
|
||||
yield $this->getMetaDataFromFileInfo($file);
|
||||
}
|
||||
} catch (NotFoundException $e) {
|
||||
return;
|
||||
} catch (NotPermittedException $e) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue