Index: image.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/image/image.module,v
retrieving revision 1.160
diff -u -r1.160 image.module
--- image.module	3 Aug 2005 00:43:42 -0000	1.160
+++ image.module	5 Aug 2005 08:33:28 -0000
@@ -122,7 +122,7 @@
  * Implements hook_cron. (deletes old temp images)
  */
 function image_cron() {
-  $path = variable_get('image_default_path', 'images') . '/temp';
+  $path = rtrim(variable_get('image_default_path', 'images'), '/') . '/temp';
   $files = file_scan_directory(file_create_path($path), '.*');
   foreach ($files as $file => $info) {
     if (time() - filemtime($file) > 60*60*6) {
@@ -586,7 +586,7 @@
  */
 function _image_check_settings() {
   // File paths
-  $image_path = file_create_path(variable_get('image_default_path', 'images'));
+  $image_path = file_create_path(rtrim(variable_get('image_default_path', 'images'), '/'));
   $temp_path = $image_path . '/temp';
 
   file_check_directory($image_path, FILE_CREATE_DIRECTORY, 'image_default_path');
@@ -642,11 +642,11 @@
     $filename = substr($filename, 0, $pos) .'.'. $type . substr($filename, $pos);
   }
 
-  $output = variable_get('image_default_path', 'images') .'/';
+  $output = rtrim(variable_get('image_default_path', 'images'), '/');
   if ($temp) {
-    $output .= 'temp/';
+    $output .= '/temp';
   }
-  $output .= $filename;
+  $output .= '/'.$filename;
 
   return $output;
 }
