summaryrefslogtreecommitdiffstats
path: root/lib/private/Preview/Bundled.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Preview/Bundled.php')
-rw-r--r--lib/private/Preview/Bundled.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/private/Preview/Bundled.php b/lib/private/Preview/Bundled.php
index 6f3d811ca61..afd286d895b 100644
--- a/lib/private/Preview/Bundled.php
+++ b/lib/private/Preview/Bundled.php
@@ -23,10 +23,9 @@
namespace OC\Preview;
+use OC\Archive\ZIP;
use OCP\Files\File;
-use OCP\Files\NotPermittedException;
use OCP\IImage;
-use OCP\Lock\LockedException;
/**
* Extracts a preview from files that embed them in an ZIP archive
@@ -39,10 +38,9 @@ abstract class Bundled extends ProviderV2 {
try {
$content = $file->fopen('r');
- $content = stream_get_contents($content);
file_put_contents($sourceTmp, $content);
- $zip = new \OC\Archive\ZIP($sourceTmp);
+ $zip = new ZIP($sourceTmp);
$zip->extractFile($path, $targetTmp);
$image = new \OC_Image();