From 7c8ffe94733abec11c5f3bac5ce015fee848779e Mon Sep 17 00:00:00 2001 From: Cameron Date: Tue, 7 May 2013 04:35:35 -0700 Subject: [PATCH] better debug info --- e107_handlers/file_class.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/e107_handlers/file_class.php b/e107_handlers/file_class.php index 2ebd8dd69..cfbcffae4 100644 --- a/e107_handlers/file_class.php +++ b/e107_handlers/file_class.php @@ -761,6 +761,8 @@ class e_file $destpath = ($type == 'theme') ? e_THEME : e_PLUGIN; $typeDiz = ucfirst($type); + + @copy(e_TEMP.$localfile,e_BACKUP.$dir.".zip"); // Make a Backup in the system folder. if($dir && is_dir($destpath.$dir)) @@ -772,12 +774,19 @@ class e_file exit; } + if($dir == '') + { + echo ""; + @unlink(e_TEMP.$localfile); + exit; + } + if(is_dir(e_TEMP.$dir)) { $status = "Unzipping..."; if(!rename(e_TEMP.$dir,$destpath.$dir)) { - $alert = $tp->toJS("Couldn't Move ".$typeDiz." to ".$typeDiz." Folder"); + $alert = $tp->toJS("Couldn't Move ".e_TEMP.$dir." to ".$destpath.$dir." Folder"); echo ""; @unlink(e_TEMP.$localfile); exit;