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 Diff line number Diff line
@@ -24,14 +24,15 @@ class CacheWrapper extends Wrapper {
	}

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

	public function insert($file, $data) {