we were installing to wrong dir if source name != lib name

This commit is contained in:
henderkes 2025-12-18 11:06:21 +01:00
parent 37f604c821
commit 5dcdaaf9dc

View File

@ -357,11 +357,11 @@ abstract class LibraryBase
} }
foreach ($license_files as $index => $license) { foreach ($license_files as $index => $license) {
if ($license['type'] === 'text') { if ($license['type'] === 'text') {
FileSystem::writeFile(BUILD_ROOT_PATH . '/source-licenses/' . $this->getName() . "/{$index}.txt", $license['text']); FileSystem::writeFile(BUILD_ROOT_PATH . "/source-licenses/{$source}/{$index}.txt", $license['text']);
continue; continue;
} }
if ($license['type'] === 'file') { if ($license['type'] === 'file') {
copy($this->source_dir . '/' . $license['path'], BUILD_ROOT_PATH . '/source-licenses/' . $this->getName() . "/{$index}.txt"); copy($this->source_dir . '/' . $license['path'], BUILD_ROOT_PATH . "/source-licenses/{$source}/{$index}.txt");
} }
} }
} }