Index: filefield.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/filefield/filefield.module,v
retrieving revision 1.216
diff -u -p -r1.216 filefield.module
--- filefield.module	5 May 2010 23:25:24 -0000	1.216
+++ filefield.module	6 Jun 2010 19:28:06 -0000
@@ -123,14 +123,14 @@ function filefield_theme() {
  * Implementation of hook_file_download().
  */
 function filefield_file_download($file) {
-  $file = file_create_path($file);
-
-  $result = db_query("SELECT * FROM {files} WHERE filepath = '%s'", $file);
-  if (!$file = db_fetch_object($result)) {
-    // We don't really care about this file.
-    return;
+  $filepath = file_create_path($file);
+  $result = db_query("SELECT * FROM {files} WHERE filepath = '%s'", $filepath);
+  while ($file = db_fetch_object($result)) {
+    if ($file->filepath == $filepath) {
+      // Ensure case sensitivity in result.
+      break; 
+    }
   }
-
   // Find out if any file field contains this file, and if so, which field
   // and node it belongs to. Required for later access checking.
   $cck_files = array();
