ARCANEDEV / LogViewer

:page_with_curl: Provides a log viewer for Laravel
MIT License
2.37k stars 335 forks source link

No log files exist if the project path contains square brackets #425

Closed EmadFathy closed 8 months ago

EmadFathy commented 2 years ago

Hello,

The wrong behavior:

When opening the log-viewer no log files exist.

The cause:

Using PHP glob() function to get the log files breaks the package if the project path contains square brackets. This is a known issue with glob() function (https://bugs.php.net/bug.php?id=33047).

Example path:

D:\laravel\[2]New\

Glob() is used here:

https://github.com/ARCANEDEV/LogViewer/blob/f81e0f6cf9804265beb9056d1dd2b82091ffad73/src/Utilities/Filesystem.php#L301

If you can use another approach to get the log files, it will be great!

Specs:

log-viewer: 8.3.0 PHP: 8.1.6 Laravel: 8.83.23 OS: Windows 10