From f18a66f1ea28dae13bfe89e615432c8f95622be0 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Wed, 25 Feb 2015 08:54:44 +0800 Subject: [PATCH] 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. --- lib/componentlib.class.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/componentlib.class.php b/lib/componentlib.class.php index 9e4dfdaa53c..cac0f6e722f 100644 --- a/lib/componentlib.class.php +++ b/lib/componentlib.class.php @@ -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)) {