Skip to content

Commit c39664d

Browse files
authored
Fix absolute path
An absolute path starts with an extra / For example, /c:/... or //var/... This causes a path error in windows
1 parent fe2b0dd commit c39664d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Manager.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ public function processFileContents($file)
155155
array_unshift($directories, '');
156156

157157
foreach ($directories as $directory) {
158-
$directory = Str::finish($directory, DIRECTORY_SEPARATOR);
158+
if (!empty($directory)) {
159+
$directory = Str::finish($directory, DIRECTORY_SEPARATOR);
160+
}
159161

160162
if (is_file($directory . $file)) {
161163
return file_get_contents($directory . $file);

0 commit comments

Comments
 (0)