From f9c1978c5ebfaa03ff76944516718fc2fe300d96 Mon Sep 17 00:00:00 2001 From: Mikhail Golenkov Date: Thu, 4 Feb 2021 17:27:54 +1100 Subject: [PATCH] MDL-70752 restore: Fix remote file recovery --- backup/util/dbops/restore_dbops.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backup/util/dbops/restore_dbops.class.php b/backup/util/dbops/restore_dbops.class.php index e8f13823455..3da5cfe1b3c 100644 --- a/backup/util/dbops/restore_dbops.class.php +++ b/backup/util/dbops/restore_dbops.class.php @@ -1078,8 +1078,8 @@ abstract class restore_dbops { $localpath = $filesystem->get_local_path_from_storedfile($storedfile); $fs->create_file_from_pathname($file, $localpath); } else if ($filesystem->is_file_readable_remotely_by_storedfile($storedfile)) { - $url = $filesystem->get_remote_path_from_storedfile($storedfile); - $fs->create_file_from_url($file, $url); + $remotepath = $filesystem->get_remote_path_from_storedfile($storedfile); + $fs->create_file_from_pathname($file, $remotepath); } else if ($filesystem->is_file_readable_locally_by_storedfile($storedfile, true)) { $localpath = $filesystem->get_local_path_from_storedfile($storedfile, true); $fs->create_file_from_pathname($file, $localpath);