fix realpath getter

This commit is contained in:
crazywhalecc 2023-03-21 01:52:40 +08:00
parent da03db051d
commit 17e0265ed0
No known key found for this signature in database
GPG Key ID: 1F4BDD59391F2680

View File

@ -7,6 +7,7 @@ namespace SPC\builder\traits;
use SPC\builder\LibraryBase; use SPC\builder\LibraryBase;
use SPC\exception\FileSystemException; use SPC\exception\FileSystemException;
use SPC\exception\RuntimeException; use SPC\exception\RuntimeException;
use SPC\store\FileSystem;
trait UnixLibraryTrait trait UnixLibraryTrait
{ {
@ -33,7 +34,7 @@ trait UnixLibraryTrait
foreach ($libs as $lib) { foreach ($libs as $lib) {
$libFiles = []; $libFiles = [];
foreach ($lib->getStaticLibs() as $name) { foreach ($lib->getStaticLibs() as $name) {
$name = str_replace(' ', '\ ', realpath(BUILD_LIB_PATH . "/{$name}")); $name = str_replace(' ', '\ ', FileSystem::convertPath(BUILD_LIB_PATH . "/{$name}"));
$name = str_replace('"', '\"', $name); $name = str_replace('"', '\"', $name);
$libFiles[] = $name; $libFiles[] = $name;
} }