also implement for FailedCache and NullCache
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
719db4cee9
commit
f6f92e8bc6
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue