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

Commit f3c0fac1 authored by Fahim Salam Chowdhury's avatar Fahim Salam Chowdhury 👽
Browse files

rnd: throw exception from cacheWrapper formatCacheEntry

parent 24d82146
Loading
Loading
Loading
Loading
Loading
+9 −8
Original line number Original line Diff line number Diff line
@@ -24,14 +24,15 @@ class CacheWrapper extends Wrapper {
	}
	}


	protected function formatCacheEntry($entry) {
	protected function formatCacheEntry($entry) {
		if (isset($entry['path']) && isset($entry['permissions'])) {
		throw new \OC\ServiceUnavailableException('Service unavailable');
			try {
		// if (isset($entry['path']) && isset($entry['permissions'])) {
				throw new \Exception('Access denied', 503);
		// 	try {
			} catch (\Exception) {
		// 		throw new \Exception('Access denied', 503);
				$entry['permissions'] &= $this->mask;
		// 	} catch (\Exception) {
			}
		// 		$entry['permissions'] &= $this->mask;
		}
		// 	}
		return $entry;
		// }
		// return $entry;
	}
	}


	public function insert($file, $data) {
	public function insert($file, $data) {