Skip to content

Commit b7875a9

Browse files
committed
rollback directory separator normalize
1 parent 9a8cfe5 commit b7875a9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/TicketSwapErrorFormatter.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,15 +180,13 @@ public static function link(
180180

181181
private static function trimPath(string $path) : string
182182
{
183-
// Normalize to forward slashes for consistent handling across platforms
184-
$normalizedPath = str_replace('\\', '/', $path);
185-
$parts = explode('/', $normalizedPath);
183+
$parts = explode(DIRECTORY_SEPARATOR, $path);
186184
if (count($parts) < 6) {
187185
return $path;
188186
}
189187

190188
return implode(
191-
'/',
189+
DIRECTORY_SEPARATOR,
192190
[
193191
...array_slice($parts, 0, 3),
194192
'...',

0 commit comments

Comments
 (0)