Browse files

remove quotes from convert.exe in some cases

  • Loading branch information...
shish committed Aug 8, 2011
1 parent 3692b7c commit 3aeb288b2915a07221d1158ec0f8dd2d4c2186d7
Showing with 1 addition and 0 deletions.
  1. +1 −0 ext/handle_pixel/main.php
@@ -90,6 +90,7 @@ private function make_thumb_convert($inname, $outname) {
// 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");

0 comments on commit 3aeb288

Please sign in to comment.