mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-07 06:17:14 +02:00
35 lines
1.2 KiB
Diff
35 lines
1.2 KiB
Diff
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);
|
|
}
|