don't generate previews of empty txt files

remotes/origin/stable6
Georg Ehrke 12 years ago
parent 4b5fb08c2c
commit 623f9ec817
  1. 4
      lib/preview/txt.php

@ -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…
Cancel
Save