Skip to content

Commit 7a4b54d

Browse files
committed
fix: returned library file path from the PHP side
1 parent f44410f commit 7a4b54d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Parser.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ private function getFFI(): FFI
134134
*/
135135
private function findLibrary(): string
136136
{
137+
$libraryName = "libpubliccode-parser.so";
137138
$possiblePaths = [
138139
__DIR__ . '/',
139140
__DIR__ . '/../lib/',
@@ -143,8 +144,9 @@ private function findLibrary(): string
143144
];
144145

145146
foreach ($possiblePaths as $path) {
146-
if (file_exists($path . 'libpubliccode-parser.so')) {
147-
return $path;
147+
$filePath = $path . $libraryName;
148+
if (file_exists($filePath)) {
149+
return $filePath;
148150
}
149151
}
150152

0 commit comments

Comments
 (0)