From 4f864c6a8034c09141370ea1c673efc294cf067c Mon Sep 17 00:00:00 2001 From: Shish Date: Mon, 8 Aug 2011 13:01:35 +0100 Subject: [PATCH] remove quotes from convert.exe in some cases --- ext/handle_pixel/main.php | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/handle_pixel/main.php b/ext/handle_pixel/main.php index f2ba9ad5..d31b83f6 100644 --- a/ext/handle_pixel/main.php +++ b/ext/handle_pixel/main.php @@ -96,6 +96,7 @@ class PixelFileHandler extends DataHandlerExtension { // running the call with cmd.exe requires quoting for our paths $format = '"%s" "%s[0]" -crop %ux%u +repage -flatten -strip -thumbnail %ux%u jpg:"%s"'; $cmd = sprintf($format, $convert, $inname, $size[0], $size[1], $w, $h, $outname); + $cmd = str_replace("\"convert\"", "convert", $cmd); // quotes are only needed if the path to convert contains a space; some other times, quotes break things, see github bug #27 exec($cmd, $output, $ret); log_debug('handle_pixel', "Generating thumnail with command `$cmd`, returns $ret");