? 862406-fix.patch
Index: imagemagick.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/imagemagick/imagemagick.module,v
retrieving revision 1.8
diff -u -p -r1.8 imagemagick.module
--- imagemagick.module	30 Jan 2011 19:37:44 -0000	1.8
+++ imagemagick.module	30 Jan 2011 20:13:34 -0000
@@ -363,14 +363,14 @@ function _imagemagick_convert_exec($comm
 
   // Specify Drupal's root as the working a working directory so that relative
   // paths are interpreted correctly.
-  $drupal_path = $_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['SCRIPT_NAME'] ? $_SERVER['SCRIPT_NAME'] : $_SERVER['SCRIPT_FILENAME']);
+  $drupal_path = DRUPAL_ROOT;
 
   if (strstr($_SERVER['SERVER_SOFTWARE'], 'Win32') || strstr($_SERVER['SERVER_SOFTWARE'], 'IIS')) {
     // Use Window's start command to avoid the "black window" from showing up:
     // http://us3.php.net/manual/en/function.exec.php#56599
     // Use /D to run the command from PHP's current working directory so the
     // file paths don't have to be absolute.
-    $convert_path = 'start "window title" /D' . escapeshellarg($drupal_path) . ' /B ' . escapeshellarg($convert_path);
+    $convert_path = 'start "window title" /D ' . escapeshellarg($drupal_path) . ' /B ' . escapeshellarg($convert_path);
   }
 
   $descriptors = array(
