From c3cf0622b62f2e72364417becf141316f069a9c5 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 18 May 2005 05:17:11 +0000 Subject: - Patch by Drumm: one more attempt at fixing file_create_path(). --- includes/file.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'includes') diff --git a/includes/file.inc b/includes/file.inc index c62334154..090eb788c 100644 --- a/includes/file.inc +++ b/includes/file.inc @@ -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; -- cgit v1.2.3