Commit 727b07e9 authored by catch's avatar catch

Issue #1068266 by jbrown: Followup to drupal_mkdir() does not set permissions...

Issue #1068266 by jbrown: Followup to drupal_mkdir() does not set permissions to directories it created recursively - fix directory separator issue affecting windows.
parent 6d50bc10
......@@ -1746,6 +1746,9 @@ function drupal_mkdir($uri, $mode = NULL, $recursive = FALSE, $context = NULL) {
// If recursive, create each missing component of the parent directory
// individually and set the mode explicitly to override the umask.
if ($recursive) {
// Ensure the path is using DIRECTORY_SEPARATOR.
$uri = str_replace('/', DIRECTORY_SEPARATOR, $uri);
// Determine the components of the path.
$components = explode(DIRECTORY_SEPARATOR, $uri);
array_pop($components);
$recursive_path = '';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment