Skip to content

Commit

Permalink
validate empty cache file by filesize
Browse files Browse the repository at this point in the history
  • Loading branch information
mvenghaus committed Oct 26, 2024
1 parent 01dd34f commit 3e5215b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Sushi.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public static function bootSushi()
$states['no-caching-capabilities']();
break;

case file_exists($cachePath) && filemtime($dataPath) <= filemtime($cachePath):
case file_exists($cachePath) && filesize($cachePath) > 0 && filemtime($dataPath) <= filemtime($cachePath):
$states['cache-file-found-and-up-to-date']();
break;

Expand Down

0 comments on commit 3e5215b

Please sign in to comment.