aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Template/JSResourceLocator.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Template/JSResourceLocator.php')
-rw-r--r--lib/private/Template/JSResourceLocator.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/private/Template/JSResourceLocator.php b/lib/private/Template/JSResourceLocator.php
index 9a2e0848214..d38488e4618 100644
--- a/lib/private/Template/JSResourceLocator.php
+++ b/lib/private/Template/JSResourceLocator.php
@@ -76,6 +76,13 @@ class JSResourceLocator extends ResourceLocator {
$app_path = \OC_App::getAppPath($app);
$app_url = \OC_App::getAppWebPath($app);
+ if ($app_path !== false) {
+ // Account for the possibility of having symlinks in app path. Only
+ // do this if $app_path is set, because an empty argument to realpath
+ // gets turned into cwd.
+ $app_path = realpath($app_path);
+ }
+
// missing translations files fill be ignored
if (strpos($script, 'l10n/') === 0) {
$this->appendIfExist($app_path, $script . '.js', $app_url);