Bug #100282 » 0001-hotfix-windows-symlink-support.patch
vendor/typo3/cms-core/Classes/Composer/PackageArtifactBuilder.php | ||
---|---|---|
use Composer\Repository\PlatformRepository;
|
||
use Composer\Script\Event;
|
||
use Composer\Util\Filesystem;
|
||
use Composer\Util\Platform;
|
||
use TYPO3\CMS\Composer\Plugin\Config;
|
||
use TYPO3\CMS\Composer\Plugin\Core\InstallerScript;
|
||
use TYPO3\CMS\Composer\Plugin\Util\ExtensionKeyResolver;
|
||
... | ... | |
}
|
||
$relativePath = substr($fileSystemResourcesPath, strlen($baseDir));
|
||
[$relativePrefix] = explode('Resources/Public', $relativePath);
|
||
if (Platform::isWindows()) {
|
||
$relativePrefix = str_replace('\\', '/', $relativePrefix);
|
||
}
|
||
$publicResourcesPath = $fileSystem->normalizePath($this->config->get('web-dir') . '/_assets/' . md5($relativePrefix));
|
||
$fileSystem->ensureDirectoryExists(dirname($publicResourcesPath));
|
||
if (!$fileSystem->isSymlinkedDirectory($publicResourcesPath)) {
|
||
$fileSystem->relativeSymlink($fileSystemResourcesPath, $publicResourcesPath);
|
||
if (Platform::isWindows()) {
|
||
if (!$fileSystem->isJunction($publicResourcesPath)) {
|
||
$fileSystem->junction($fileSystemResourcesPath, $publicResourcesPath);
|
||
}
|
||
} else {
|
||
if (!$fileSystem->isSymlinkedDirectory($publicResourcesPath)) {
|
||
$fileSystem->relativeSymlink($fileSystemResourcesPath, $publicResourcesPath);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
-
|