Commit 7bb07297c0dd0f90058e015aa9476d04e64e8630

Authored by Paul Barrett
1 parent 15830591

Paths in thumbnails plugin must be in quotes for windows systems

Committed by: Paul Barrett

Reviewed by: Prince Mbekwa
plugins/thumbnails/thumbnails.php
... ... @@ -180,9 +180,13 @@ class thumbnailGenerator extends BaseProcessor
180 180 $pathConvert = (!empty($default->convertPath)) ? $default->convertPath : 'convert';
181 181 // windows path may contain spaces
182 182 if (WINDOWS_OS) {
183   - $pathConvert = '"' . $pathConvert . '"';
  183 + $cmd = "\"{$pathConvert}\" -size 200x200 \"{$pdfFile}[0]\" -resize 200x200 \"$thumbnailfile\"";
184 184 }
185   - $result = KTUtil::pexec("{$pathConvert} -size 200x200 {$pdfFile}[0] -resize 200x200 $thumbnailfile");
  185 + else {
  186 + $cmd = "{$pathConvert} -size 200x200 {$pdfFile}[0] -resize 200x200 $thumbnailfile";
  187 + }
  188 +
  189 + $result = KTUtil::pexec($cmd);
186 190 return true;
187 191 //}else{
188 192 //$default->log->debug('Thumbnail Generator Plugin: Imagemagick not installed, cannot generate a thumbnail');
... ...