Skip to content

Commit

Permalink
Merge pull request #5659 from nextcloud/fix/invalid-storage-workspace
Browse files Browse the repository at this point in the history
fix: Avoid throwing when a workspace file cannot be found due to a failed storage
  • Loading branch information
blizzz authored Apr 11, 2024
2 parents 72bce25 + ba427a6 commit 2fad799
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 2fad799

Please sign in to comment.