Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
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 97a9eacedf5..93a737b66cc 100644
--- a/lib/private/Template/JSResourceLocator.php
+++ b/lib/private/Template/JSResourceLocator.php
@@ -75,6 +75,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);