Plugin Directory

Changeset 421410


Ignore:
Timestamp:
08/10/2011 08:44:19 AM (15 years ago)
Author:
orangelab
Message:

keep fixing for Windows...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • imagemagick-engine/trunk/imagemagick-engine.php

    r420547 r421410  
    66  Author: Orangelab
    77  Author URI: http://www.orangelab.se
    8   Version: 1.3.1-beta1
     8  Version: 1.3.1-beta2
    99  Text Domain: imagemagick-engine
    1010
     
    425425}
    426426
    427 // Escape cli executable
    428 function ime_im_cli_escape_cmd($cmd) {
    429     return '"' . $cmd . '"';
    430 }
    431 
    432427// Test if we are allowed to exec executable!
    433428function ime_im_cli_check_executable($fullpath) {
     
    435430        return false;
    436431
    437     @exec(ime_im_cli_escape_cmd($fullpath) . ' --version', $output);
     432    @exec('"' . $fullpath . '" --version', $output);
    438433
    439434    return count($output) > 0;
     
    457452    $path = ime_try_realpath($path);
    458453
    459     $cmd = escapeshellcmd($path . '/' . $executable);
     454    $cmd = $path . '/' . $executable;
    460455    if (ime_im_cli_check_executable($cmd))
    461456        return $cmd;
     
    503498    if (empty($cmd))
    504499        return false;
    505     $cmd = ime_im_cli_escape_cmd($cmd);
    506500
    507501    $old_file = addslashes($old_file);
     
    511505
    512506    // limits are 150mb and 128mb
    513     $cmd = "$cmd \"$old_file\" -limit memory 157286400 -limit map 134217728 -resize $geometry";
     507    $cmd = "\"$cmd\" \"$old_file\" -limit memory 157286400 -limit map 134217728 -resize $geometry";
    514508    if ($crop) {
    515509        // '^' is an escape character on Windows
Note: See TracChangeset for help on using the changeset viewer.