Skip to content
Snippets Groups Projects
Commit 727b07e9 authored by catch's avatar catch
Browse files

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
No related branches found
No related tags found
No related merge requests found
......@@ -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 = '';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment