[drupal-devel] [bug] file_create_path() is faulty in 4.6 and HEAD
drupal-devel at drupal.org
Tue May 17 22:55:51 UTC 2005
Issue status update for http://drupal.org/node/23100
Component: file system
Category: bug reports
Assigned to: drumm
Reported by: drumm
Updated by: drumm
Attachment: http://drupal.org/files/issues/file.inc_4.diff (1.04 KB)
Conditions to reproduce:
- 'Temporary directory' on the admin/settings page is configured to
something not starting with the configuration of 'File system path'.
For example, the default '/tmp' does not start with the default file
system path 'files'.
- There are not directories named the same as the temporary directory
in the file system path. In the above example, path/to/drupal/files/tmp
should not exist.
1. file_create_path('/tmp/something') is called.
2. file_check_location('/tmp/something', 'files') returns false.
3. Fall back to file_check_location('files//tmp/something', 'files'),
which does one of two things:
- if path/to/drupal/files/tmp exists that is happily used, ignoring the
admin's configuration, and things work.
- otherwise the whole thing returns FALSE and a bunch of stuff up the
stack gets horribly confused.
Lets add in another check to see if the file is in the temporary
directory between steps 2 and 3.
More information about the drupal-devel