There should be 4th bool argument for allowing recursive directory creation, which should be passed for mkdir() as 2nd argument
function file_check_directory(&$directory, $mode = 0, $form_item = NULL) {
$directory = rtrim($directory, '/\\');
// Check if directory exists.
if (!is_dir($directory)) {
if (($mode & FILE_CREATE_DIRECTORY) && @mkdir($directory)) {
drupal_chmod($directory);
}
...
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | drupal_mkdir.patch | 632 bytes | meba |
Comments
Comment #1
meba commentedI even think that it should be default behaviour, to create all directories in path if FILE_CREATE_DIRECTORY bit is set.
Comment #2
meba commentedSimple patch.
Comment #4
alan d. commentedSee #515280- file_check_directory() should create recursively