Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit b3c00549c575448033d8d0ea56319118554a9390 1 parent d0530ed
@mudrd8mz mudrd8mz authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 mod/folder/backup/moodle1/lib.php
View
6 mod/folder/backup/moodle1/lib.php
@@ -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.