diff --git a/class/files.py b/class/files.py index ffee06c3..bc8b552a 100644 --- a/class/files.py +++ b/class/files.py @@ -390,8 +390,9 @@ def DeleteDir(self,get) : try: #检查是否存在.user.ini - if os.path.exists(get.path+'/.user.ini'): - os.system("chattr -i '"+get.path+"/.user.ini'") + #if os.path.exists(get.path+'/.user.ini'): + # os.system("chattr -i '"+get.path+"/.user.ini'") + os.system("chattr -R -i " + get.path) if hasattr(get,'empty'): if not self.delete_empty(get.path): return public.returnMsg(False,'DIR_ERR_NOT_EMPTY'); @@ -883,6 +884,7 @@ def SetBatchData(self,get): public.writeSpeed(key,i,l); if os.path.isdir(filename): if not self.CheckDir(filename): return public.returnMsg(False,'FILE_DANGER'); + os.system("chattr -R -i " + filename) if isRecyle: self.Mv_Recycle_bin(get) else: diff --git a/class/plugin_deployment.py b/class/plugin_deployment.py index e4438f1d..456653ae 100644 --- a/class/plugin_deployment.py +++ b/class/plugin_deployment.py @@ -285,7 +285,7 @@ def SetupPackage(self,get): self.WriteLogs(json.dumps({'name':'安装必要的PHP扩展','total':0,'used':0,'pre':0,'speed':0})); import files mfile = files.files(); - pinfo['php_ext'] = pinfo['php_ext'].strip().split(',') + if type(pinfo['php_ext']) == str : pinfo['php_ext'] = pinfo['php_ext'].strip().split(',') for ext in pinfo['php_ext']: if ext == 'pathinfo': import config @@ -302,6 +302,7 @@ def SetupPackage(self,get): #解禁PHP函数 if 'enable_functions' in pinfo: try: + if type(pinfo['enable_functions']) == str : pinfo['enable_functions'] = pinfo['enable_functions'].strip().split(',') php_f = public.GetConfigValue('setup_path') + '/php/' + php_version + '/etc/php.ini' php_c = public.readFile(php_f) rep = "disable_functions\s*=\s{0,1}(.*)\n" @@ -382,6 +383,7 @@ def SetupPackage(self,get): #清理文件和目录 self.WriteLogs(json.dumps({'name':'清理多余的文件','total':0,'used':0,'pre':0,'speed':0})); + if type(pinfo['remove_file']) == str : pinfo['remove_file'] = pinfo['remove_file'].strip().split(',') for f_path in pinfo['remove_file']: filename = (path + '/' + f_path).replace('//','/') if os.path.exists(filename):