From 29816bf588d362d3d9897fbf7a829e81ae306964 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pablo=20Villaf=C3=A1=C3=B1ez?= Date: Thu, 11 May 2017 12:43:08 +0200 Subject: [PATCH] Return false if the stat doesn't find the file --- apps/files_external/lib/Lib/Storage/SMB.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/files_external/lib/Lib/Storage/SMB.php b/apps/files_external/lib/Lib/Storage/SMB.php index a03324853ebe..e0688a345a60 100644 --- a/apps/files_external/lib/Lib/Storage/SMB.php +++ b/apps/files_external/lib/Lib/Storage/SMB.php @@ -286,7 +286,12 @@ private function removeFromCache($path) { */ public function stat($path) { $this->log('enter: '.__FUNCTION__."($path)"); - $result = $this->formatInfo($this->getFileInfo($path)); + try { + $result = $this->formatInfo($this->getFileInfo($path)); + } catch (NotFoundException $e) { + $this->swallow(__FUNCTION__, $e); + $result = false; + } return $this->leave(__FUNCTION__, $result); }