File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,9 @@ public function logs(): LogReader
58
58
59
59
public function size (): int
60
60
{
61
- return LogViewer::getFilesystem ($ this ->absolutePath )->size ($ this ->path );
61
+ return LogViewer::getFilesystem ($ this ->absolutePath )->exists ($ this ->path )
62
+ ? LogViewer::getFilesystem ($ this ->absolutePath )->size ($ this ->path )
63
+ : 0 ;
62
64
}
63
65
64
66
public function sizeInMB (): float
@@ -111,13 +113,13 @@ public function getLastScannedFilePositionForQuery(?string $query = ''): ?int
111
113
public function earliestTimestamp (): int
112
114
{
113
115
return $ this ->getMetadata ('earliest_timestamp ' )
114
- ?? LogViewer::getFilesystem ($ this ->absolutePath )->lastModified ($ this ->path );
116
+ ?? LogViewer::getFilesystem ($ this ->absolutePath )->exists ( $ this -> path ) ? LogViewer:: getFilesystem ( $ this -> absolutePath )-> lastModified ($ this ->path ) : 0 ;
115
117
}
116
118
117
119
public function latestTimestamp (): int
118
120
{
119
121
return $ this ->getMetadata ('latest_timestamp ' )
120
- ?? LogViewer::getFilesystem ($ this ->absolutePath )->lastModified ($ this ->path );
122
+ ?? LogViewer::getFilesystem ($ this ->absolutePath )->exists ( $ this -> path ) ? LogViewer:: getFilesystem ( $ this -> absolutePath )-> lastModified ($ this ->path ) : 0 ;
121
123
}
122
124
123
125
public function scan (int $ maxBytesToScan = null , bool $ force = false ): void
You can’t perform that action at this time.
0 commit comments