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 6c8d2c8 + 36b7a96 commit 4aeb24fCopy full SHA for 4aeb24f
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