remove quotes from convert.exe in some cases
This commit is contained in:
parent
71e07bd13f
commit
4f864c6a80
@ -96,6 +96,7 @@ class PixelFileHandler extends DataHandlerExtension {
|
|||||||
// running the call with cmd.exe requires quoting for our paths
|
// 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"';
|
$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 = 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);
|
exec($cmd, $output, $ret);
|
||||||
|
|
||||||
log_debug('handle_pixel', "Generating thumnail with command `$cmd`, returns $ret");
|
log_debug('handle_pixel', "Generating thumnail with command `$cmd`, returns $ret");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user