don't generate previews of empty txt files
This commit is contained in:
parent
4b5fb08c2c
commit
623f9ec817
1 changed files with 4 additions and 0 deletions
|
@ -17,6 +17,10 @@ class TXT extends Provider {
|
|||
$content = $fileview->fopen($path, 'r');
|
||||
$content = stream_get_contents($content);
|
||||
|
||||
if(trim($content) === '') {
|
||||
return false;
|
||||
}
|
||||
|
||||
$lines = preg_split("/\r\n|\n|\r/", $content);
|
||||
|
||||
$fontSize = 5; //5px
|
||||
|
|
Loading…
Reference in a new issue