diff --git a/pandora_console/godmode/servers/plugin_registration.php b/pandora_console/godmode/servers/plugin_registration.php index f29364bbc4..2f69836268 100644 --- a/pandora_console/godmode/servers/plugin_registration.php +++ b/pandora_console/godmode/servers/plugin_registration.php @@ -152,7 +152,7 @@ if ($error === null) { $error = __('Cannot load INI file'); } else { // Relocate files to target destination. - Files::move($tmp_path.'/*', $basepath.'/', true); + Files::move($tmp_path.'/', $basepath.'/', true); // Extract information. $version = preg_replace('/.*[.]/', '', $filename); diff --git a/pandora_console/include/lib/Tools/Files.php b/pandora_console/include/lib/Tools/Files.php index 7b9b8892a3..fee7f87445 100644 --- a/pandora_console/include/lib/Tools/Files.php +++ b/pandora_console/include/lib/Tools/Files.php @@ -343,8 +343,13 @@ class Files } // If we copied this successfully, mark it for deletion. - rename($source.$file, $destination.$file); + $return = rename($source.$file, $destination.$file); + if ($return === false) { + return $return; + } } + + return $return; }