]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19194 fixed regression - recursive cretion of dirs on win32 works again
authorskodak <skodak>
Fri, 15 May 2009 07:21:29 +0000 (07:21 +0000)
committerskodak <skodak>
Fri, 15 May 2009 07:21:29 +0000 (07:21 +0000)
lib/moodlelib.php

index 0adfb7ed3d885d68fbf2486cc0c392125e0ef8e8..accd03680023f0ded5014ef1c28318a6f188be3c 100644 (file)
@@ -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);
     }