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:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user