Merge pull request #7558 from owncloud/fix_issue_loading_cached_thumb

fix issue with spamming logging files when loading cached thumbnail
This commit is contained in:
Morris Jobke 2014-03-05 15:23:35 +01:00
commit 37d22bf170
1 changed files with 3 additions and 1 deletions

View File

@ -403,7 +403,9 @@ class Preview {
$cached = $this->isCached();
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->resizeAndCrop();
}