From 1f7e3605b0eb2c2d673fcd239272663ae0c90d0b Mon Sep 17 00:00:00 2001 From: Leonardo Arena Date: Tue, 14 Nov 2017 14:07:15 +0000 Subject: community/nextcloud: add upstream fix for project issue #6028 Remove chmod() from other places --- ...eLocator-account-for-symlinks-in-app-path.patch | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 community/nextcloud/0001-CSSResourceLocator-account-for-symlinks-in-app-path.patch (limited to 'community/nextcloud/0001-CSSResourceLocator-account-for-symlinks-in-app-path.patch') diff --git a/community/nextcloud/0001-CSSResourceLocator-account-for-symlinks-in-app-path.patch b/community/nextcloud/0001-CSSResourceLocator-account-for-symlinks-in-app-path.patch new file mode 100644 index 0000000000..b6355b0d7f --- /dev/null +++ b/community/nextcloud/0001-CSSResourceLocator-account-for-symlinks-in-app-path.patch @@ -0,0 +1,34 @@ +From b0d296639cfc5d0460987787cc9869c5e5473d85 Mon Sep 17 00:00:00 2001 +From: Kyle Fazzari +Date: Fri, 3 Nov 2017 23:03:34 -0700 +Subject: [PATCH] CSSResourceLocator: account for symlinks in app path + +Currently, if the app path includes a symlink, the calculated webDir +will be incorrect when generating CSS and URLs will be pointing to the +wrong place, breaking CSS. + +Use realpath when retrieving app path, and these issues go away. + +Fix #6028 + +Signed-off-by: Kyle Fazzari +--- + lib/private/Template/CSSResourceLocator.php | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/lib/private/Template/CSSResourceLocator.php b/lib/private/Template/CSSResourceLocator.php +index 1028f31a5ea..bd5b9a34477 100644 +--- a/lib/private/Template/CSSResourceLocator.php ++++ b/lib/private/Template/CSSResourceLocator.php +@@ -71,6 +71,11 @@ public function doFind($style) { + return; + } + ++ // Account for the possibility of having symlinks in app path. Doing ++ // this here instead of above as an empty argument to realpath gets ++ // turned into cwd. ++ $app_path = realpath($app_path); ++ + if(!$this->cacheAndAppendScssIfExist($app_path, $style.'.scss', $app)) { + $this->append($app_path, $style.'.css', $app_url); + } -- cgit v1.2.3