We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 325d258 + 8aa6247 commit 0ddfc75Copy full SHA for 0ddfc75
apps/files_trashbin/lib/Sabre/TrashFile.php
@@ -9,10 +9,16 @@
9
namespace OCA\Files_Trashbin\Sabre;
10
11
use OCA\Files_Trashbin\Trashbin;
12
+use OCP\Files\ForbiddenException;
13
+use Sabre\DAV\Exception\Forbidden;
14
15
class TrashFile extends AbstractTrashFile {
16
public function get() {
- return $this->data->getStorage()->fopen(Trashbin::getTrashFilename($this->data->getInternalPath(), $this->getDeletionTime()), 'rb');
17
+ try {
18
+ return $this->data->getStorage()->fopen(Trashbin::getTrashFilename($this->data->getInternalPath(), $this->getDeletionTime()), 'rb');
19
+ } catch (ForbiddenException) {
20
+ throw new Forbidden();
21
+ }
22
}
23
24
public function getName(): string {
0 commit comments