Skip to content

Commit 377ef12

Browse files
committed
Add check if root is not empty and append a / if it does not yet exist
1 parent a663c36 commit 377ef12

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/LogViewerService.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ protected function getFilePathsMatchingPattern($pattern)
7272

7373
public function basePathForLogs(): string
7474
{
75-
return config('log-viewer.filesystem.root');
75+
$rootFolder = Str::of(config('log-viewer.filesystem.root'));
76+
return empty($rootFolder)
77+
? $rootFolder->finish('/')
78+
: $rootFolder;
7679
}
7780

7881
/**

0 commit comments

Comments
 (0)