Browse Source

Issue #9318: catch exceptions in SCSSCacher::resetCache()

Signed-off-by: Roland Tapken <roland@bitarbeiter.net>
Roland Tapken 6 years ago
parent
commit
6270a01cab
1 changed files with 5 additions and 1 deletions
  1. 5 1
      lib/private/Template/SCSSCacher.php

+ 5 - 1
lib/private/Template/SCSSCacher.php

@@ -273,7 +273,11 @@ class SCSSCacher {
 		$appDirectory = $this->appData->getDirectoryListing();
 		foreach ($appDirectory as $folder) {
 			foreach ($folder->getDirectoryListing() as $file) {
-				$file->delete();
+				try {
+					$file->delete();
+				} catch(NotPermittedException $e) {
+					$this->logger->logException($e, ['message' => 'SCSSCacher: unable to delete file: ' . $file->getName()]);
+				}
 			}
 		}
 	}