summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2021-03-08 19:27:39 +0100
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2021-03-16 16:18:11 +0000
commit53dcc7b1ca7414af03162e1514f92ca38ddb31bd (patch)
tree716885ca3ddd421265d75db62756464e63d04967 /lib/private
parentcc1a5d5ced6c95add5fa885fdc0f501d643b8004 (diff)
downloadnextcloud-server-53dcc7b1ca7414af03162e1514f92ca38ddb31bd.tar.gz
nextcloud-server-53dcc7b1ca7414af03162e1514f92ca38ddb31bd.zip
also implement for FailedCache and NullCache
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Files/Cache/FailedCache.php5
-rw-r--r--lib/private/Lockdown/Filesystem/NullCache.php5
2 files changed, 10 insertions, 0 deletions
diff --git a/lib/private/Files/Cache/FailedCache.php b/lib/private/Files/Cache/FailedCache.php
index b57ca2b2572..d9315ec50d5 100644
--- a/lib/private/Files/Cache/FailedCache.php
+++ b/lib/private/Files/Cache/FailedCache.php
@@ -24,6 +24,7 @@ namespace OC\Files\Cache;
use OCP\Constants;
use OCP\Files\Cache\ICache;
+use OCP\Files\Cache\ICacheEntry;
use OCP\Files\Search\ISearchQuery;
/**
@@ -134,4 +135,8 @@ class FailedCache implements ICache {
public function normalize($path) {
return $path;
}
+
+ public function copyFromCache(ICache $sourceCache, ICacheEntry $sourceEntry, string $targetPath): int {
+ throw new \Exception("Invalid cache");
+ }
}
diff --git a/lib/private/Lockdown/Filesystem/NullCache.php b/lib/private/Lockdown/Filesystem/NullCache.php
index 396bf68d5df..267b76ab8fb 100644
--- a/lib/private/Lockdown/Filesystem/NullCache.php
+++ b/lib/private/Lockdown/Filesystem/NullCache.php
@@ -26,6 +26,7 @@ namespace OC\Lockdown\Filesystem;
use OC\Files\Cache\CacheEntry;
use OCP\Constants;
use OCP\Files\Cache\ICache;
+use OCP\Files\Cache\ICacheEntry;
use OCP\Files\FileInfo;
use OCP\Files\Search\ISearchQuery;
@@ -122,4 +123,8 @@ class NullCache implements ICache {
public function normalize($path) {
return $path;
}
+
+ public function copyFromCache(ICache $sourceCache, ICacheEntry $sourceEntry, string $targetPath): int {
+ throw new \OC\ForbiddenException('This request is not allowed to access the filesystem');
+ }
}