fix bug
This commit is contained in:
		
							parent
							
								
									eb9da1489d
								
							
						
					
					
						commit
						5b309f8dbd
					
				| 
						 | 
				
			
			@ -24,8 +24,11 @@ class ProjectUpdateConfig(Task):
 | 
			
		|||
 | 
			
		||||
        dst = os.path.join(self.context.temp_project_path, os.path.basename(target_path).replace(".zip", ""))
 | 
			
		||||
 | 
			
		||||
        if not self.context.update_config:
 | 
			
		||||
            app_logger().info("No update config found")
 | 
			
		||||
        if os.path.exists(dst):
 | 
			
		||||
            shutil.rmtree(dst)
 | 
			
		||||
 | 
			
		||||
        result = FileUtils.decompress(target_path, dst)
 | 
			
		||||
        app_logger().debug(f"{target_path} -> {dst} , 解压结果: {result}")
 | 
			
		||||
 | 
			
		||||
        with open(os.path.join(dst, "tkg_config_mainly.properties"), 'rb') as f:
 | 
			
		||||
            self.context.config = javaproperties.load(f)
 | 
			
		||||
| 
						 | 
				
			
			@ -33,14 +36,6 @@ class ProjectUpdateConfig(Task):
 | 
			
		|||
        # 不打admob
 | 
			
		||||
        if self.context.admob_app_id is None or self.context.admob_app_id == "":
 | 
			
		||||
            self.context.admob_app_id = self.context.get_config("admob_id")
 | 
			
		||||
            return
 | 
			
		||||
 | 
			
		||||
        if os.path.exists(dst):
 | 
			
		||||
            shutil.rmtree(dst)
 | 
			
		||||
 | 
			
		||||
        result = FileUtils.decompress(target_path, dst)
 | 
			
		||||
        app_logger().debug(f"{target_path} -> {dst} , 解压结果: {result}")
 | 
			
		||||
 | 
			
		||||
        mainly_path = os.path.join(dst, "mainly")
 | 
			
		||||
        if not os.path.exists(mainly_path):
 | 
			
		||||
            mainly_path = os.path.join(dst, "appConfig")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue