mirror of
https://github.com/moodle/moodle.git
synced 2025-04-24 09:55:33 +02:00
MDL-49008 lang: Revert unnecessary rename warning
This was failing unit tests because it does not check for the presence of the source directory first. If there is no source directory, it cannot be moved.
This commit is contained in:
parent
86e5b0a707
commit
1725c553ac
@ -326,10 +326,7 @@ class component_installer {
|
||||
@remove_dir($destinationcomponent.'_old'); // Deleting a possible old version.
|
||||
|
||||
// Moving to a safe place.
|
||||
$moveresult = @rename($destinationcomponent, $destinationcomponent.'_old');
|
||||
if (!$moveresult) {
|
||||
debugging("Failed to rename {$destinationcomponent} to {$destinationcomponent}_old while installing a language");
|
||||
}
|
||||
@rename($destinationcomponent, $destinationcomponent.'_old');
|
||||
|
||||
/// Unzip new version
|
||||
if (!unzip_file($zipfile, $destinationdir, false)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user