fix issue with spamming logging files when loading cached thumbnail

This commit is contained in:
Georg Ehrke 2014-03-05 13:20:50 +01:00
parent a8ae2f10b9
commit bdb96b9af8

View file

@ -403,7 +403,9 @@ class Preview {
$cached = $this->isCached(); $cached = $this->isCached();
if ($cached) { if ($cached) {
$image = new \OC_Image($this->userView->file_get_contents($cached, 'r')); $stream = $this->userView->fopen($cached, 'r');
$image = new \OC_Image();
$image->loadFromFileHandle($stream);
$this->preview = $image->valid() ? $image : null; $this->preview = $image->valid() ? $image : null;
$this->resizeAndCrop(); $this->resizeAndCrop();
} }