summaryrefslogtreecommitdiffstats
path: root/lib/private/Preview/Generator.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Preview/Generator.php')
-rw-r--r--lib/private/Preview/Generator.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/private/Preview/Generator.php b/lib/private/Preview/Generator.php
index 5a264c2bbd5..71e9fdb1a20 100644
--- a/lib/private/Preview/Generator.php
+++ b/lib/private/Preview/Generator.php
@@ -110,6 +110,12 @@ class Generator {
$maxPreview = $this->getMaxPreview($previewFolder, $file, $mimeType);
list($maxWidth, $maxHeight) = $this->getPreviewSize($maxPreview);
+ // If both width and heigth are -1 we just want the max preview
+ if ($width === -1 && $height === -1) {
+ $width = $maxWidth;
+ $height = $maxHeight;
+ }
+
// Calculate the preview size
list($width, $height) = $this->calculateSize($width, $height, $crop, $mode, $maxWidth, $maxHeight);