On the admin/settings page the help text for the Temporary Directory field reads:

"Location where uploaded files will be kept during previews. Relative paths will be resolved relative to the file system path."

However, this does not seem to be the case. Just above the code which generates this message (system.module line 237) the temp directory is checked as relative to the site root. Similar interpretation is found in file_create_path($dest) (file.inc line 52):

// 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;

I believe the code in both places works as it should; the help text on this field should be revised to something like:

"Location where uploaded files will be kept during previews. Relative paths are interpreted from the Drupal installation directory."

CommentFileSizeAuthor
#1 tmp_path.patch2.09 KBUwe Hermann
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Uwe Hermann’s picture

Version: 4.6.2 » x.y.z
Status: Active » Needs review
FileSize
2.09 KB

Here's a patch for HEAD which fixes the documentation. Not sure whether the docs or the code should be fixed. Comments?

Dries’s picture

Status: Needs review » Fixed

I think this is OK. Committed it. Thanks.

Anonymous’s picture

Anonymous’s picture

Status: Fixed » Closed (fixed)