Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d1d77be authored by Akhil's avatar Akhil 🙂
Browse files

Fix imports

parent 7a42c1bc
Loading
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ declare(strict_types=1);

namespace OCA\EcloudAccounts\AppInfo;

use OC\Files\Filesystem;
use OCA\EcloudAccounts\Filesystem\StorageWrapper;
use OCA\EcloudAccounts\Listeners\BeforeTemplateRenderedListener;
use OCA\EcloudAccounts\Listeners\BeforeUserDeletedListener;
@@ -40,6 +41,7 @@ use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent;
use OCP\Files\Storage\IStorage;
use OCP\IUserManager;
use OCP\User\Events\BeforeUserDeletedEvent;
use OCP\User\Events\PasswordUpdatedEvent;
@@ -87,7 +89,7 @@ class Application extends App implements IBootstrap {
	 * @return StorageWrapper|IStorage
	 */
	public function addStorageWrapperCallback($mountPoint, IStorage $storage) {
		if (!OC::$CLI && $mountPoint !== '/') {
		if (!\OC::$CLI && $mountPoint !== '/') {
			return new StorageWrapper([
				'storage' => $storage,
				'mountPoint' => $mountPoint,
+5 −8
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ namespace OCA\EcloudAccounts\Filesystem;

use OC\Files\Cache\Wrapper\CacheWrapper as Wrapper;
use OCP\Constants;
use OCP\Files\Cache\ICache;
use OCP\Files\ForbiddenException;

class CacheWrapper extends Wrapper {
@@ -24,7 +25,7 @@ class CacheWrapper extends Wrapper {
	protected function formatCacheEntry($entry) {
		if (isset($entry['path']) && isset($entry['permissions'])) {
			try {
				throw new ForbiddenException('Access denied');
				throw new ForbiddenException('Access denied', false);
			} catch (ForbiddenException) {
				$entry['permissions'] &= $this->mask;
			}
@@ -32,19 +33,15 @@ class CacheWrapper extends Wrapper {
		return $entry;
	}

	public function get($fileId) {
		throw new OCP\Files\Cache\CacheEntryNotFoundException('User data cache access is disabled.');
	}

	public function insert($file, $data) {
		throw new \OCP\Files\Cache\CacheUpdateForbiddenException('User data cache insert is disabled.');
		throw new \Exception('User data cache insert is disabled.');
	}

	public function update($id, $data) {
		throw new \OCP\Files\Cache\CacheUpdateForbiddenException('User data cache update is disabled.');
		throw new \Exception('User data cache update is disabled.');
	}

	public function remove($fileId) {
		throw new \OCP\Files\Cache\CacheUpdateForbiddenException('User data cache removal is disabled.');
		throw new \Exception('User data cache removal is disabled.');
	}
}
+1 −1
Original line number Diff line number Diff line
@@ -213,7 +213,7 @@ class StorageWrapper extends Wrapper implements IWriteStreamStorage {
			$storage = $this;
		}
		$cache = $this->storage->getCache($path, $storage);
		return new CacheWrapper($cache, $storage, $this->operation);
		return new CacheWrapper($cache, $storage);
	}

	/**