Index: imagecache.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/imagecache/imagecache.module,v
retrieving revision 1.9
diff -u -r1.9 imagecache.module
--- imagecache.module	31 Jul 2006 00:30:10 -0000	1.9
+++ imagecache.module	11 Aug 2006 18:22:47 -0000
@@ -69,14 +69,17 @@
   $path = implode('/', $args); 
   // verify that the source exists, if not exit. Maybe display a missing image.
   $source = file_create_path($path);
-  if (!is_file($source)) { drupal_set_message('$source does not exist'); 
-     return 'source does not exist';
-    //deliver not found image and exit.
+  if (!is_file($source)) { 
+		drupal_set_message("$source does not exist"); 
+    return 'source does not exist';
+    //@todo: Add a global not found image, and a not found
+    //image per ruleset, and deliver here if the ruleset
+    //is flagged to provide a not found image.
   }
 
 
   $destination = file_create_path() . '/imagecache/'. $ruleset['rulesetname'] .'/'. $path;
-  $tmpdestination = file_directory_temp() .'/'. str_replace(dirname($path), '', $path);
+  $tmpdestination = file_directory_temp() . str_replace(dirname($path), '', $path);
   $dir = dirname($destination);
   //drupal_set_message('$tmpdestination: '. $tmpdestination);
   //drupal_set_message('$destination: '. $destination);
@@ -97,7 +100,7 @@
   }
 
   //check if file exists to prevent multiple apache children from trying to generate.
-  if (!is_file($tmpdestination)) {
+  if (!is_file($destination)) {
     $generated = TRUE;
     file_copy($source, $tmpdestination);
 
@@ -118,6 +121,8 @@
       }
     }
     file_move($tmpdestination, $destination);
+	} else {
+		$generated = TRUE;
   }
 
   if ($generated)  {
