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>
This commit is contained in:
parent
6fd99b4e47
commit
b0d296639c
|
@ -71,6 +71,11 @@ class CSSResourceLocator extends ResourceLocator {
|
||||||
return;
|
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)) {
|
if(!$this->cacheAndAppendScssIfExist($app_path, $style.'.scss', $app)) {
|
||||||
$this->append($app_path, $style.'.css', $app_url);
|
$this->append($app_path, $style.'.css', $app_url);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue