### Eclipse Workspace Patch 1.0
#P Drupal HEAD #2
Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.585
diff -u -r1.585 common.inc
--- includes/common.inc	31 Oct 2006 16:42:52 -0000	1.585
+++ includes/common.inc	14 Nov 2006 23:53:31 -0000
@@ -556,6 +556,21 @@
 }
 
 /**
+ * Helper function to strip slashes from $_FILES on Windows skipping over the
+ * tmp_name keys since PHP generates single backslashes for file paths.
+ */
+function _fix_gpc_magic_files_windows(&$item, $key) {
+  if ($key != 'tmp_name') {
+    if (is_array($item)) {
+      array_walk($item, '_fix_gpc_magic_files_windows');
+    }
+    else {
+      $item = stripslashes($item);
+    }
+  }
+}
+
+/**
  * Correct double-escaping problems caused by "magic quotes" in some PHP
  * installations.
  */
@@ -566,7 +581,12 @@
     array_walk($_POST, '_fix_gpc_magic');
     array_walk($_COOKIE, '_fix_gpc_magic');
     array_walk($_REQUEST, '_fix_gpc_magic');
-    array_walk($_FILES, '_fix_gpc_magic');
+    if (substr(PHP_OS, 0, 3) == 'WIN') {
+      array_walk($_FILES, '_fix_gpc_magic_files_windows');
+    }
+    else {
+      array_walk($_FILES, '_fix_gpc_magic');
+    }
     $fixed = TRUE;
   }
 }
