Skip to content

Commit

Permalink
MDL-75616 backup: Use standard temp directory for extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
kingdavid127 authored and davewoloszyn committed Nov 13, 2023
1 parent 8ad9114 commit 0a6b4bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions admin/cli/restore_backup.php
Expand Up @@ -80,8 +80,8 @@
throw new \moodle_exception('invalidcategoryid');
}

$backupdir = "restore_" . uniqid();
$path = $CFG->tempdir . DIRECTORY_SEPARATOR . "backup" . DIRECTORY_SEPARATOR . $backupdir;
$backupdir = restore_controller::get_tempdir_name(SITEID, $USER->id);
$path = make_backup_temp_directory($backupdir);

cli_heading(get_string('extractingbackupfileto', 'backup', $path));
$fp = get_file_packer('application/vnd.moodle.backup');
Expand Down

0 comments on commit 0a6b4bb

Please sign in to comment.