Bladeren bron

#1156: properly escape file paths containing spaces

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3795 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 9 jaren geleden
bovenliggende
commit
aef3b50dba
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2 2
      core/simplegraph.class.inc.php

+ 2 - 2
core/simplegraph.class.inc.php

@@ -516,7 +516,7 @@ EOF
 			@fwrite($rFile, $sDotDescription);
 			@fclose($rFile);
 			$aOutput = array();
-			$CommandLine = "\"$sDotExecutable\" -v -Tpng < $sDotFilePath -o$sImageFilePath 2>&1";
+			$CommandLine = "\"$sDotExecutable\" -v -Tpng < \"$sDotFilePath\" -o\"$sImageFilePath\" 2>&1";
 		
 			exec($CommandLine, $aOutput, $iRetCode);
 			if ($iRetCode != 0)
@@ -572,7 +572,7 @@ EOF
 			@fwrite($rFile, $sDotDescription);
 			@fclose($rFile);
 			$aOutput = array();
-			$CommandLine = "\"$sDotExecutable\" -v -Tdot < $sDotFilePath -o$sXdotFilePath 2>&1";
+			$CommandLine = "\"$sDotExecutable\" -v -Tdot < \"$sDotFilePath\" -o\"$sXdotFilePath\" 2>&1";
 	
 			exec($CommandLine, $aOutput, $iRetCode);
 			if ($iRetCode != 0)