summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/Controller/SvgController.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/Controller/SvgController.php b/core/Controller/SvgController.php
index 1fad9c39c3b..fc34ac4d41d 100644
--- a/core/Controller/SvgController.php
+++ b/core/Controller/SvgController.php
@@ -89,13 +89,14 @@ class SvgController extends Controller {
return $this->getSvg($path, $color, $fileName);
}
+ // e.g /var/www/html/custom_apps/contacts
+ // or outside root /var/www/apps/files
$appRootPath = $this->appManager->getAppPath($app);
- $appPath = substr($appRootPath, strlen($this->serverRoot));
- if (!$appPath) {
+ if (!$appRootPath) {
return new NotFoundResponse();
}
- $path = $this->serverRoot . $appPath ."/img/$fileName.svg";
+ $path = $appRootPath ."/img/$fileName.svg";
return $this->getSvg($path, $color, $fileName);
}