Merge pull request #7556 from nextcloud/smb-stat-exception
handle exceptions in SMB::stat
This commit is contained in:
commit
b01d20c0d7
|
@ -207,12 +207,14 @@ class SMB extends Common implements INotifyStorage {
|
|||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $path
|
||||
* @return array
|
||||
*/
|
||||
public function stat($path) {
|
||||
try {
|
||||
$result = $this->formatInfo($this->getFileInfo($path));
|
||||
} catch (ForbiddenException $e) {
|
||||
return false;
|
||||
} catch (NotFoundException $e) {
|
||||
return false;
|
||||
}
|
||||
if ($this->remoteIsShare() && $this->isRootDir($path)) {
|
||||
$result['mtime'] = $this->shareMTime();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue