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:
Andrew Nicols 2015-02-25 08:54:44 +08:00
parent 86e5b0a707
commit 1725c553ac

View File

@ -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)) {