From bdb96b9af85256f9b3f8663ccf6d27b3d1330918 Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Wed, 5 Mar 2014 13:20:50 +0100 Subject: [PATCH] fix issue with spamming logging files when loading cached thumbnail --- lib/private/preview.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/private/preview.php b/lib/private/preview.php index 798a1322b0..b0d91fd568 100755 --- a/lib/private/preview.php +++ b/lib/private/preview.php @@ -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(); }