diff --git a/lib/Service/WorkspaceService.php b/lib/Service/WorkspaceService.php index 087f960941a..8bec036a202 100644 --- a/lib/Service/WorkspaceService.php +++ b/lib/Service/WorkspaceService.php @@ -29,15 +29,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;