Skip to content

Commit

Permalink
fix: Avoid throwing when a workspace file cannot be found due to a fa…
Browse files Browse the repository at this point in the history
…iled storage

Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr authored and backportbot[bot] committed Apr 12, 2024
1 parent a4acacc commit 870733f
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 870733f

Please sign in to comment.