From 62d5bcd749b3149c30ef0efeb2eba79f9976c07b Mon Sep 17 00:00:00 2001 From: patdenice Date: Sun, 1 May 2011 10:10:45 +0000 Subject: feature:2284 Avoid error when spaces are present in dirname. git-svn-id: http://piwigo.org/svn/trunk@10713 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/include/image.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/include/image.class.php b/admin/include/image.class.php index 64c485887..ba8abf52d 100644 --- a/admin/include/image.class.php +++ b/admin/include/image.class.php @@ -406,7 +406,7 @@ class image_ext_imagick implements imageInterface $this->source_filepath = $source_filepath; $this->imagickdir = $imagickdir; - $command = $imagickdir."identify -verbose ".realpath($source_filepath); + $command = $imagickdir.'identify -verbose "'.realpath($source_filepath).'"'; @exec($command, $returnarray, $returnvalue); if($returnvalue) { @@ -476,7 +476,7 @@ class image_ext_imagick implements imageInterface function write($destination_filepath) { $exec = $this->imagickdir.'convert'; - $exec .= ' '.realpath($this->source_filepath); + $exec .= ' "'.realpath($this->source_filepath).'"'; foreach ($this->commands as $command => $params) { @@ -488,7 +488,7 @@ class image_ext_imagick implements imageInterface } $dest = pathinfo($destination_filepath); - $exec .= ' '.realpath($dest['dirname']).'/'.$dest['basename']; + $exec .= ' "'.realpath($dest['dirname']).'/'.$dest['basename'].'"'; @exec($exec, $returnarray, $returnvalue); return !$returnvalue; } -- cgit v1.2.3