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.
What happens:
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.
Solution:
Lets add in another check to see if the file is in the temporary directory between steps 2 and 3.
| Comment | File | Size | Author |
|---|---|---|---|
| file.inc_4.diff | 1.04 KB | drumm |
Comments
Comment #1
dries commentedCommitted to HEAD and DRUPAL-4-6. Thanks.
Comment #2
(not verified) commented