From 727b07e97d62bd6da10e901fee0c228cdbcde272 Mon Sep 17 00:00:00 2001 From: catch <catch@35733.no-reply.drupal.org> Date: Thu, 14 Feb 2013 11:29:24 +0000 Subject: [PATCH] Issue #1068266 by jbrown: Followup to drupal_mkdir() does not set permissions to directories it created recursively - fix directory separator issue affecting windows. --- core/includes/file.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/includes/file.inc b/core/includes/file.inc index ecb360437f5f..534d211587ca 100644 --- a/core/includes/file.inc +++ b/core/includes/file.inc @@ -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 = ''; -- GitLab