Finish implementing localPath in combineToFile (#3727)
Fixes #3721. Credit to @Rike-cz
This commit is contained in:
parent
cf8a73f0a2
commit
a03a76ee52
|
|
@ -205,6 +205,17 @@ class CombineAssets
|
|||
// Disable cache always
|
||||
$this->storagePath = null;
|
||||
|
||||
// Prefix all assets
|
||||
if ($localPath) {
|
||||
if (substr($localPath, -1) !== '/') {
|
||||
$localPath = $localPath.'/';
|
||||
}
|
||||
$assets = array_map(function($asset) use ($localPath) {
|
||||
if (substr($asset, 0, 1) === '@') return $asset;
|
||||
return $localPath.$asset;
|
||||
}, $assets);
|
||||
}
|
||||
|
||||
list($assets, $extension) = $this->prepareAssets($assets);
|
||||
|
||||
$rewritePath = File::localToPublic(dirname($destination));
|
||||
|
|
|
|||
Loading…
Reference in New Issue