From d0bee08e8a6cc853ddbf765b58d15fb2368a069f Mon Sep 17 00:00:00 2001 From: Hani Rouatbi Date: Sat, 1 Jul 2023 18:24:08 +0100 Subject: [PATCH] Update j_plugins.php Delete the file after closing the ZipArchive --- includes/adm/j_plugins.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/adm/j_plugins.php b/includes/adm/j_plugins.php index 87cdea3..fa677db 100755 --- a/includes/adm/j_plugins.php +++ b/includes/adm/j_plugins.php @@ -657,9 +657,6 @@ switch ($case): { if ($zip->extractTo(PATH . KLEEJA_PLUGINS_FOLDER)) { - // we dont need the zip file anymore - kleeja_unlink(PATH . 'cache/' . $plugin_name . '.zip'); - // uploaded plugin's archive has different name, so we change it rename( PATH . KLEEJA_PLUGINS_FOLDER . '/' . trim($zip->getNameIndex(0), '/'), @@ -668,6 +665,9 @@ switch ($case): $zip->close(); + // we dont need the zip file anymore + kleeja_unlink(PATH . 'cache/' . $plugin_name . '.zip'); + // download or update msg $adminAjaxContent = '1:::' . sprintf($lang[$is_update ? 'ITEM_UPDATED' : 'ITEM_DOWNLOADED'], $plugin_name);