Commit 7bb07297c0dd0f90058e015aa9476d04e64e8630
1 parent
15830591
Paths in thumbnails plugin must be in quotes for windows systems
Committed by: Paul Barrett Reviewed by: Prince Mbekwa
Showing
1 changed file
with
6 additions
and
2 deletions
plugins/thumbnails/thumbnails.php
| @@ -180,9 +180,13 @@ class thumbnailGenerator extends BaseProcessor | @@ -180,9 +180,13 @@ class thumbnailGenerator extends BaseProcessor | ||
| 180 | $pathConvert = (!empty($default->convertPath)) ? $default->convertPath : 'convert'; | 180 | $pathConvert = (!empty($default->convertPath)) ? $default->convertPath : 'convert'; |
| 181 | // windows path may contain spaces | 181 | // windows path may contain spaces |
| 182 | if (WINDOWS_OS) { | 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 | return true; | 190 | return true; |
| 187 | //}else{ | 191 | //}else{ |
| 188 | //$default->log->debug('Thumbnail Generator Plugin: Imagemagick not installed, cannot generate a thumbnail'); | 192 | //$default->log->debug('Thumbnail Generator Plugin: Imagemagick not installed, cannot generate a thumbnail'); |