? .directory
? drupal-755586-D7.patch
? drupal-828268-D7.patch
? includes/.directory
Index: includes/file.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/file.inc,v
retrieving revision 1.212
diff -u -p -r1.212 file.inc
--- includes/file.inc	14 Jun 2010 13:33:45 -0000	1.212
+++ includes/file.inc	15 Jun 2010 21:26:29 -0000
@@ -1538,7 +1538,14 @@ function file_unmanaged_save_data($data,
   }
 
   // Move the file to its final destination.
-  return file_unmanaged_move($temp_name, $destination, $replace);
+  $path = file_unmanaged_move($temp_name, $destination, $replace);
+
+  // Make sure everything was moved correctly
+  if (strlen($data) > 0 && @filesize($path) == 0) {
+    @unlink($path)
+    return FALSE;
+  }
+  return $path;
 }
 
 /**
