Skip to content

Commit

Permalink
Add check if root is not empty and append a / if it does not yet exist
Browse files Browse the repository at this point in the history
  • Loading branch information
florisbosch committed Dec 15, 2022
1 parent a663c36 commit 377ef12
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/LogViewerService.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ protected function getFilePathsMatchingPattern($pattern)

public function basePathForLogs(): string
{
return config('log-viewer.filesystem.root');
$rootFolder = Str::of(config('log-viewer.filesystem.root'));
return empty($rootFolder)
? $rootFolder->finish('/')
: $rootFolder;
}

/**
Expand Down

0 comments on commit 377ef12

Please sign in to comment.