Permalink
Browse files

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

  • Loading branch information...
1 parent a7b8726 commit e97b6677445ef38623b525480dc8c529f6d4074d @mudrd8mz mudrd8mz committed Feb 8, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 mod/folder/backup/moodle1/lib.php
@@ -65,7 +65,11 @@ public function process_legacy_resource($data) {
// 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");

0 comments on commit e97b667

Please sign in to comment.