Project

General

Profile

Bug #100282 » 0001-hotfix-windows-symlink-support.patch

Hotfix Patch File (use with GitBash on Windows) - Steffen Mächtel, 2023-08-17 11:53

View differences:

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);
}
}
}
}
-
    (1-1/1)