mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
Fix issue where resized images were not correctly identified as already having been resized when atomic (blue/green) deployment strategies are used in conjunction with files being stored on the local filesystem in a shared symlinked storage folder.
This commit is contained in:
parent
618e2b58ab
commit
fe2ca6c15e
@ -219,9 +219,21 @@ class ImageResizer
|
||||
*/
|
||||
public function getConfig()
|
||||
{
|
||||
$disk = $this->image['disk'];
|
||||
|
||||
// Normalize local disk adapters with symlinked paths to their target path
|
||||
// to support atomic deployments where the base application path changes
|
||||
// each deployment but the realpath of the storage directory does not
|
||||
if (FileHelper::isLocalDisk($disk)) {
|
||||
$realPath = realpath($disk->getAdapter()->getPathPrefix());
|
||||
if ($realPath) {
|
||||
$disk->getAdapter()->setPathPrefix($realPath);
|
||||
}
|
||||
}
|
||||
|
||||
$config = [
|
||||
'image' => [
|
||||
'disk' => $this->image['disk'],
|
||||
'disk' => $disk,
|
||||
'path' => $this->image['path'],
|
||||
'source' => $this->image['source'],
|
||||
],
|
||||
|
Loading…
x
Reference in New Issue
Block a user