Skip to content

Commit d46eb99

Browse files
committed
fix: normalize path separators in getBasename method
1 parent 0297b11 commit d46eb99

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Service/Hyva/ModuleScanner.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,8 @@ public function getModuleInfo(string $modulePath): array
203203
*/
204204
private function getBasename(string $path): string
205205
{
206-
$trimmed = rtrim($path, '/');
206+
$normalized = str_replace('\\', '/', $path);
207+
$trimmed = rtrim($normalized, '/');
207208
$pos = strrpos($trimmed, '/');
208209
if ($pos === false) {
209210
return $trimmed;

0 commit comments

Comments
 (0)