summaryrefslogtreecommitdiffstats
path: root/core/Controller
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-12-21 17:37:29 +0100
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-12-21 17:37:29 +0100
commit8a8ef211c8c7477cf2de0a3e867c52a87770a4e8 (patch)
tree686413f418a830473c02c6a0aec09124f5af4aa2 /core/Controller
parentb9628e74fc1e82e0a7b4ed40d9afc813859677ce (diff)
downloadnextcloud-server-8a8ef211c8c7477cf2de0a3e867c52a87770a4e8.tar.gz
nextcloud-server-8a8ef211c8c7477cf2de0a3e867c52a87770a4e8.zip
Use only app path to get the icon on the svg api
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'core/Controller')
-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);
}