Skip to content

Commit 72b1a0e

Browse files
committed
try with files instead of allfiles
1 parent 211019a commit 72b1a0e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/LogFolder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function download(): BinaryFileResponse
123123
/** @var LogFile $file */
124124
foreach ($this->files() as $file) {
125125
if (Gate::check('downloadLogFile', $file)) {
126-
$zip->addFromString(name: $file->name, content: LogViewer::getFilesystem()->get($file->path));
126+
$zip->addFromString(name: $file->name, content: LogViewer::getFilesystem($file->absolutePath)->get($file->path));
127127
}
128128
}
129129

src/LogViewerService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ protected function getFilePathsMatchingPattern($pattern, $absolute = false): arr
6565
$files = [];
6666

6767
if (! $absolute) {
68-
$scannedFiles = $this->getFilesystem()->allFiles($this->basePathForLogs());
68+
$scannedFiles = $this->getFilesystem()->files($this->basePathForLogs());
6969
} else {
7070
$pathInfo = pathinfo($pattern);
7171
$dirname = $pathInfo['dirname'];
7272
$pattern = $pathInfo['basename'];
7373

74-
$scannedFiles = $this->getFilesystem($dirname)->allFiles();
74+
$scannedFiles = $this->getFilesystem($dirname)->files();
7575
}
7676

7777
foreach ($scannedFiles as $file) {

0 commit comments

Comments
 (0)