aboutsummaryrefslogtreecommitdiffstats
path: root/community/nextcloud/0003-JSResourceLocator-re-use-app_path.patch
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2017-11-14 14:07:15 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2017-11-14 14:08:04 +0000
commit1f7e3605b0eb2c2d673fcd239272663ae0c90d0b (patch)
treeee302c72881a470fb22166f11a9426198a2d4338 /community/nextcloud/0003-JSResourceLocator-re-use-app_path.patch
parentcdb56c9dc7a839c179250dfedf16cd0e9cac10be (diff)
downloadaports-1f7e3605b0eb2c2d673fcd239272663ae0c90d0b.tar.bz2
aports-1f7e3605b0eb2c2d673fcd239272663ae0c90d0b.tar.xz
community/nextcloud: add upstream fix for project issue #6028
Remove chmod() from other places
Diffstat (limited to 'community/nextcloud/0003-JSResourceLocator-re-use-app_path.patch')
-rw-r--r--community/nextcloud/0003-JSResourceLocator-re-use-app_path.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/community/nextcloud/0003-JSResourceLocator-re-use-app_path.patch b/community/nextcloud/0003-JSResourceLocator-re-use-app_path.patch
new file mode 100644
index 0000000000..c32d48b3d5
--- /dev/null
+++ b/community/nextcloud/0003-JSResourceLocator-re-use-app_path.patch
@@ -0,0 +1,47 @@
+From d2a2793073929194cdb2de31cfb331fc5e95346e Mon Sep 17 00:00:00 2001
+From: Kyle Fazzari <kyrofa@ubuntu.com>
+Date: Sun, 12 Nov 2017 08:08:38 -0800
+Subject: [PATCH] JSResourceLocator: re-use $app_path
+
+Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
+---
+ lib/private/Template/JSResourceLocator.php | 16 +++++++++-------
+ 1 file changed, 9 insertions(+), 7 deletions(-)
+
+diff --git a/lib/private/Template/JSResourceLocator.php b/lib/private/Template/JSResourceLocator.php
+index 228fa09e821..93a737b66cc 100644
+--- a/lib/private/Template/JSResourceLocator.php
++++ b/lib/private/Template/JSResourceLocator.php
+@@ -75,14 +75,16 @@ public function doFind($script) {
+ $app_path = \OC_App::getAppPath($app);
+ $app_url = \OC_App::getAppWebPath($app);
+
+- // Account for the possibility of having symlinks in app path. Doing
+- // this in a separate variable, because an empty argument to realpath
+- // gets turned into cwd, which makes it hard to see if app_path got set.
+- $real_app_path = realpath($app_path);
++ 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($real_app_path, $script . '.js', $app_url);
++ $this->appendIfExist($app_path, $script . '.js', $app_url);
+ return;
+ }
+
+@@ -94,8 +96,8 @@ public function doFind($script) {
+ return;
+ }
+
+- if (!$this->cacheAndAppendCombineJsonIfExist($real_app_path, $script.'.json', $app)) {
+- $this->append($real_app_path, $script . '.js', $app_url);
++ if (!$this->cacheAndAppendCombineJsonIfExist($app_path, $script.'.json', $app)) {
++ $this->append($app_path, $script . '.js', $app_url);
+ }
+ }
+