Skip to content

Commit

Permalink
Merge pull request #5663 from nextcloud/backport/5659/stable29
Browse files Browse the repository at this point in the history
[stable29] fix: Avoid throwing when a workspace file cannot be found due to a failed storage
  • Loading branch information
juliusknorr authored Apr 12, 2024
2 parents a4acacc + 870733f commit ff0a3de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Service/WorkspaceService.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use OCP\Files\File;
use OCP\Files\Folder;
use OCP\Files\NotFoundException;
use OCP\Files\StorageInvalidException;
use OCP\IL10N;

class WorkspaceService {
Expand All @@ -29,7 +30,8 @@ public function getFile(Folder $folder): ?File {
if ($file instanceof File) {
return $file;
}
} catch (NotFoundException $e) {
} catch (NotFoundException|StorageInvalidException) {
return null;
}
}
}
Expand Down

0 comments on commit ff0a3de

Please sign in to comment.