MDL-62061 core_privacy: Stop directories being created.
authorAdrian Greeve <abgreeve@gmail.com>
Wed, 14 Nov 2018 07:11:22 +0000 (15:11 +0800)
committerAdrian Greeve <abgreeve@gmail.com>
Thu, 6 Dec 2018 10:25:32 +0000 (11:25 +0100)
This stops directories being created in the root directory
while running unit tests.

privacy/classes/local/request/moodle_content_writer.php

index 5ba00a6..327cd9e 100644 (file)
@@ -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;
         }