fix bug
This commit is contained in:
		
							parent
							
								
									eb9da1489d
								
							
						
					
					
						commit
						5b309f8dbd
					
				| 
						 | 
					@ -24,23 +24,18 @@ class ProjectUpdateConfig(Task):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        dst = os.path.join(self.context.temp_project_path, os.path.basename(target_path).replace(".zip", ""))
 | 
					        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")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            with open(os.path.join(dst, "tkg_config_mainly.properties"), 'rb') as f:
 | 
					 | 
				
			||||||
                self.context.config = javaproperties.load(f)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            # 不打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):
 | 
					        if os.path.exists(dst):
 | 
				
			||||||
            shutil.rmtree(dst)
 | 
					            shutil.rmtree(dst)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        result = FileUtils.decompress(target_path, dst)
 | 
					        result = FileUtils.decompress(target_path, dst)
 | 
				
			||||||
        app_logger().debug(f"{target_path} -> {dst} , 解压结果: {result}")
 | 
					        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)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # 不打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")
 | 
				
			||||||
        mainly_path = os.path.join(dst, "mainly")
 | 
					        mainly_path = os.path.join(dst, "mainly")
 | 
				
			||||||
        if not os.path.exists(mainly_path):
 | 
					        if not os.path.exists(mainly_path):
 | 
				
			||||||
            mainly_path = os.path.join(dst, "appConfig")
 | 
					            mainly_path = os.path.join(dst, "appConfig")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue