aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2011-05-01 10:10:45 +0000
committerpatdenice <patdenice@piwigo.org>2011-05-01 10:10:45 +0000
commit62d5bcd749b3149c30ef0efeb2eba79f9976c07b (patch)
tree92c3f35eec955be80ec904c9876391b7f4003a6c /admin
parent0db141fc62c90de376a2658868a0c3f42f45395b (diff)
feature:2284
Avoid error when spaces are present in dirname. git-svn-id: http://piwigo.org/svn/trunk@10713 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/include/image.class.php6
1 files 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;
}