Index: includes/file.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/file.inc,v
retrieving revision 1.39.2.3
diff -u -F^f -r1.39.2.3 file.inc
--- includes/file.inc	17 May 2005 20:50:35 -0000	1.39.2.3
+++ includes/file.inc	17 May 2005 22:36:23 -0000
@@ -54,10 +54,14 @@ function file_create_path($dest = 0) {
   if (!$dest) {
     return $file_path;
   }
-  // file_check_location() checks whether the destination is inside the Drupal /files directory.
+  // file_check_location() checks whether the destination is inside the Drupal files directory.
   if (file_check_location($dest, $file_path)) {
     return $dest;
   }
+  // check if the destination is instead inside the Drupal temporary files directory.
+  else if (file_check_location($dest, variable_get('file_directory_temp', FILE_DIRECTORY_TEMP))) {
+    return $dest;
+  }
   // Not found, try again with prefixed dirctory path.
   else if (file_check_location($file_path . '/' . $dest, $file_path)) {
     return $file_path . '/' . $dest;
