diff --git a/lib/Service/WorkspaceService.php b/lib/Service/WorkspaceService.php index 143d02631ed..ae5d57f6010 100644 --- a/lib/Service/WorkspaceService.php +++ b/lib/Service/WorkspaceService.php @@ -24,17 +24,15 @@ public function __construct(IL10N $l10n) { } public function getFile(Folder $folder) { - $file = null; foreach ($this->getSupportedFilenames() as $filename) { if ($folder->nodeExists($filename)) { try { - $file = $folder->get($filename); + return $folder->get($filename); } catch (NotFoundException $e) { } - continue; } } - return $file; + return null; } public function getSupportedFilenames() {