Changeset 10713 for trunk/admin


Ignore:
Timestamp:
May 1, 2011, 12:10:45 PM (13 years ago)
Author:
patdenice
Message:

feature:2284
Avoid error when spaces are present in dirname.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/image.class.php

    r10686 r10713  
    407407    $this->imagickdir = $imagickdir;
    408408
    409     $command = $imagickdir."identify -verbose ".realpath($source_filepath);
     409    $command = $imagickdir.'identify -verbose "'.realpath($source_filepath).'"';
    410410    @exec($command, $returnarray, $returnvalue);
    411411    if($returnvalue)
     
    477477  {
    478478    $exec = $this->imagickdir.'convert';
    479     $exec .= ' '.realpath($this->source_filepath);
     479    $exec .= ' "'.realpath($this->source_filepath).'"';
    480480
    481481    foreach ($this->commands as $command => $params)
     
    489489
    490490    $dest = pathinfo($destination_filepath);
    491     $exec .= ' '.realpath($dest['dirname']).'/'.$dest['basename'];
     491    $exec .= ' "'.realpath($dest['dirname']).'/'.$dest['basename'].'"';
    492492    @exec($exec, $returnarray, $returnvalue);
    493493    return !$returnvalue;
Note: See TracChangeset for help on using the changeset viewer.