Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-37774 Do not pass trailing slash if the method does not want it

  • Loading branch information...
commit ed1f5a1f25fc4ec5c0238245a64b9af0694c52ff 1 parent e2f455b
David Mudrák mudrd8mz authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 mod/folder/backup/moodle1/lib.php
6 mod/folder/backup/moodle1/lib.php
View
@@ -65,7 +65,11 @@ public function process_legacy_resource(array $data, array $raw = null) {
// migrate the folder files
$this->fileman->filearea = 'content';
$this->fileman->itemid = 0;
- $this->fileman->migrate_directory('course_files/'.$data['reference']);
+ if (empty($data['reference'])) {
+ $this->fileman->migrate_directory('course_files');
+ } else {
+ $this->fileman->migrate_directory('course_files/'.$data['reference']);
+ }
// write folder.xml
$this->open_xml_writer("activities/folder_{$moduleid}/folder.xml");
Please sign in to comment.
Something went wrong with that request. Please try again.