From: skodak Date: Fri, 15 May 2009 07:21:29 +0000 (+0000) Subject: MDL-19194 fixed regression - recursive cretion of dirs on win32 works again X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c92ac318a93445c965ca078d10391b0ee73cb883;p=moodle.git MDL-19194 fixed regression - recursive cretion of dirs on win32 works again --- diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 0adfb7ed3d..accd036800 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -8047,7 +8047,7 @@ function remove_dir($dir, $content_only=false) { function check_dir_exists($dir, $create=false, $recursive=false) { global $CFG; - if (strstr($dir, $CFG->dataroot.'/') === false) { + if (strstr(cleardoubleslashes($dir), cleardoubleslashes($CFG->dataroot.'/')) === false) { debugging('Warning. Wrong call to check_dir_exists(). $dir must be an absolute path under $CFG->dataroot ("' . $dir . '" is incorrect)', DEBUG_DEVELOPER); }