Commit 623f9ec8 authored by Georg Ehrke's avatar Georg Ehrke
Browse files

don't generate previews of empty txt files

parent 4b5fb08c
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment