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:55:56 +08:00
parent 84be895b94
commit f18a66f1ea
+1 -4
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)) {