diff options
Diffstat (limited to 'community/nextcloud/0001-CSSResourceLocator-account-for-symlinks-in-app-path.patch')
-rw-r--r-- | community/nextcloud/0001-CSSResourceLocator-account-for-symlinks-in-app-path.patch | 34 |
1 files changed, 34 insertions, 0 deletions
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 <kyrofa@ubuntu.com> +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 <kyrofa@ubuntu.com> +--- + 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); + } |