From: tjhunt Date: Tue, 5 Dec 2006 18:42:39 +0000 (+0000) Subject: Fix error when restoring into a newly created course. The course files folder may... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=2e0ed03e5ed4180de4a6091a8ec3c9e9ee386b00;p=moodle.git Fix error when restoring into a newly created course. The course files folder may not exist yet, so need to do a recursive directory create. --- diff --git a/backup/restorelib.php b/backup/restorelib.php index c7147fda16..5be575c374 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -5964,7 +5964,7 @@ //Open file for writing //First, check that course_id/backupdata folder exists in CFG->dataroot $dest_dir = $CFG->dataroot."/".$restore->course_id."/backupdata"; - $status = check_dir_exists($dest_dir,true); + $status = check_dir_exists($dest_dir, true, true); $restorelog_file = fopen("$dest_dir/restorelog.html","a"); //Write the footer to close the logging file fwrite ($restorelog_file,"
This file was written to directly by each modules restore process.");