Index: includes/file.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/file.inc,v
retrieving revision 1.51
diff -u -r1.51 file.inc
--- includes/file.inc	12 Nov 2005 09:23:50 -0000	1.51
+++ includes/file.inc	18 Nov 2005 08:44:33 -0000
@@ -61,8 +61,8 @@
     return $dest;
   }
   // Not found, try again with prefixed directory path.
-  else if (file_check_location($file_path . '/' . $dest, $file_path)) {
-    return $file_path . '/' . $dest;
+  else if (file_check_location($file_path . DIRECTORY_SEPARATOR . $dest, $file_path)) {
+    return $file_path . DIRECTORY_SEPARATOR . $dest;
   }
   // File not found.
   return FALSE;
@@ -180,7 +180,7 @@
   }
   else {
     // This file does not yet exist
-    $source = realpath(dirname($source)) .'/'. basename($source);
+    $source = realpath(dirname($source)) .DIRECTORY_SEPARATOR. basename($source);
   }
   $directory = realpath($directory);
   if ($directory && strpos($source, $directory) !== 0) {
@@ -237,7 +237,7 @@
 
   // If the destination file is not specified then use the filename of the source file.
   $basename = $basename ? $basename : basename($source);
-  $dest = $directory .'/'. $basename;
+  $dest = $directory .DIRECTORY_SEPARATOR. $basename;
 
   // Make sure source and destination filenames are not the same, makes no sense
   // to copy it if they are. In fact copying the file will most likely result in
@@ -258,7 +258,7 @@
 
           $counter = 0;
           do {
-            $dest = $directory .'/'. $name .'_'. $counter++ . $ext;
+            $dest = $directory .DIRECTORY_SEPARATOR. $name .'_'. $counter++ . $ext;
           } while (file_exists($dest));
           break;
 
@@ -323,7 +323,7 @@
 }
 
 function file_create_filename($basename, $directory) {
-  $dest = $directory .'/'. $basename;
+  $dest = $directory .DIRECTORY_SEPARATOR. $basename;
 
   if (file_exists($dest)) {
     // Destination file already exists, generate an alternative.
@@ -337,7 +337,7 @@
 
     $counter = 0;
     do {
-      $dest = $directory .'/'. $name .'_'. $counter++ . $ext;
+      $dest = $directory .DIRECTORY_SEPARATOR. $name .'_'. $counter++ . $ext;
     } while (file_exists($dest));
   }
 
@@ -569,11 +569,9 @@
     if (substr(PHP_OS, 0, 3) == 'WIN') {
       $directories[] = 'c:\\windows\\temp';
       $directories[] = 'c:\\winnt\\temp';
-      $path_delimiter = '\\';
     }
     else {
       $directories[] = '/tmp';
-      $path_delimiter = '/';
     }
 
     foreach ($directories as $directory) {
@@ -583,7 +581,7 @@
     }
 
     // if a directory has been found, use it, otherwise default to 'files/tmp' or 'files\\tmp';
-    $temporary_directory = $temporary_directory ? $temporary_directory : file_directory_path() . $path_delimiter . 'tmp';
+    $temporary_directory = $temporary_directory ? $temporary_directory : file_directory_path() . DIRECTORY_SEPARATOR . 'tmp';
     variable_set('file_directory_temp', $temporary_directory);
   }
 

