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
5858
5959 public function size (): int
6060 {
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 ;
6264 }
6365
6466 public function sizeInMB (): float
@@ -111,13 +113,13 @@ public function getLastScannedFilePositionForQuery(?string $query = ''): ?int
111113 public function earliestTimestamp (): int
112114 {
113115 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 ;
115117 }
116118
117119 public function latestTimestamp (): int
118120 {
119121 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 ;
121123 }
122124
123125 public function scan (int $ maxBytesToScan = null , bool $ force = false ): void
You can’t perform that action at this time.
0 commit comments