diff --git a/lib/Service/WorkspaceService.php b/lib/Service/WorkspaceService.php index 988b04fc6c9..8ffa11a06ef 100644 --- a/lib/Service/WorkspaceService.php +++ b/lib/Service/WorkspaceService.php @@ -24,15 +24,13 @@ public function __construct(IL10N $l10n) { public function getFile(Folder $folder): ?File { foreach ($this->getSupportedFilenames() as $filename) { - if ($folder->nodeExists($filename)) { - try { - $file = $folder->get($filename); - if ($file instanceof File) { - return $file; - } - } catch (NotFoundException|StorageInvalidException) { - return null; + try { + $file = $folder->get($filename); + if ($file instanceof File) { + return $file; } + } catch (NotFoundException|StorageInvalidException) { + continue; } } return null;