Skip to content

Commit ea09768

Browse files
committed
also implement for FailedCache and NullCache
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 parent 6628290 commit ea09768

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

lib/private/Files/Cache/FailedCache.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
use OCP\Constants;
2626
use OCP\Files\Cache\ICache;
27+
use OCP\Files\Cache\ICacheEntry;
2728
use OCP\Files\Search\ISearchQuery;
2829

2930
/**
@@ -134,4 +135,8 @@ public function getPathById($id) {
134135
public function normalize($path) {
135136
return $path;
136137
}
138+
139+
public function copyFromCache(ICache $sourceCache, ICacheEntry $sourceEntry, string $targetPath): int {
140+
throw new \Exception("Invalid cache");
141+
}
137142
}

lib/private/Lockdown/Filesystem/NullCache.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
use OC\Files\Cache\CacheEntry;
2727
use OCP\Constants;
2828
use OCP\Files\Cache\ICache;
29+
use OCP\Files\Cache\ICacheEntry;
2930
use OCP\Files\FileInfo;
3031
use OCP\Files\Search\ISearchQuery;
3132

@@ -122,4 +123,8 @@ public function getPathById($id) {
122123
public function normalize($path) {
123124
return $path;
124125
}
126+
127+
public function copyFromCache(ICache $sourceCache, ICacheEntry $sourceEntry, string $targetPath): int {
128+
throw new \OC\ForbiddenException('This request is not allowed to access the filesystem');
129+
}
125130
}

0 commit comments

Comments
 (0)