Index: imce.module
===================================================================
--- imce.module	(revision 238)
+++ imce.module	(working copy)
@@ -85,6 +85,9 @@
  */
 function imce_file_download($file) {
   if ($path = file_create_path($file)) {
+    if (!file_exists($path)) {
+      return NULL;
+    }
     if ($info = @getimagesize($path)) {
       $type = $info['mime'];
     }
@@ -103,6 +106,7 @@
     }
     return array('Content-type: '. $type, 'Content-Length: '. filesize($path));
   }
+  return NULL;
 }
 
 /**
Index: 722176.patch
===================================================================
--- 722176.patch	(revision 236)
+++ 722176.patch	(working copy)
@@ -1,20 +1,22 @@
 Index: imce.module
 ===================================================================
---- imce.module	(revision 227)
+--- imce.module	(revision 238)
 +++ imce.module	(working copy)
-@@ -84,7 +84,7 @@
-  * Implementation of hook_file_download().
+@@ -85,6 +85,9 @@
   */
  function imce_file_download($file) {
--  if ($path = file_create_path($file)) {
-+  if ($path = file_create_path($file) && file_exists($path)) {
+   if ($path = file_create_path($file)) {
++    if (!file_exists($path)) {
++      return NULL;
++    }
      if ($info = @getimagesize($path)) {
        $type = $info['mime'];
      }
-@@ -189,4 +189,4 @@
-  */
- function imce_reg_dir($dirname) {
-   return $dirname == '.' || (is_string($dirname) && $dirname != '' && !preg_match('@(^\s)|(^/)|(^\./)|(\s$)|(/$)|(/\.$)|(\.\.)|(//)|(\\\\)|(/\./)@', $dirname));
--}
-\ No newline at end of file
-+}
+@@ -103,6 +106,7 @@
+     }
+     return array('Content-type: '. $type, 'Content-Length: '. filesize($path));
+   }
++  return NULL;
+ }
+ 
+ /**
