From 34adbfe0b1bc35b8a708b9304e7a981a2e8daac3 Mon Sep 17 00:00:00 2001 From: Adrian Greeve Date: Wed, 14 Nov 2018 15:11:22 +0800 Subject: [PATCH] MDL-62061 core_privacy: Stop directories being created. This stops directories being created in the root directory while running unit tests. --- privacy/classes/local/request/moodle_content_writer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/privacy/classes/local/request/moodle_content_writer.php b/privacy/classes/local/request/moodle_content_writer.php index 5ba00a61b64..327cd9ed505 100644 --- a/privacy/classes/local/request/moodle_content_writer.php +++ b/privacy/classes/local/request/moodle_content_writer.php @@ -212,7 +212,8 @@ class moodle_content_writer implements content_writer { [$file->get_filepath()] ); $path = $this->get_path($pathitems, $file->get_filename()); - check_dir_exists(dirname($path), true, true); + $fullpath = $this->get_full_path($pathitems, $file->get_filename()); + check_dir_exists(dirname($fullpath), true, true); $this->files[$path] = $file; }