From cfb555b8938e96ec8ac50ba9ddf31e2599d24640 Mon Sep 17 00:00:00 2001 From: tjq Date: Mon, 18 May 2020 19:47:44 +0800 Subject: [PATCH] [fix] fix container template generator's bug --- .../oms/server/common/utils/ContainerTemplateGenerator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oh-my-scheduler-server/src/main/java/com/github/kfcfans/oms/server/common/utils/ContainerTemplateGenerator.java b/oh-my-scheduler-server/src/main/java/com/github/kfcfans/oms/server/common/utils/ContainerTemplateGenerator.java index 08b0c085..78a38c5c 100644 --- a/oh-my-scheduler-server/src/main/java/com/github/kfcfans/oms/server/common/utils/ContainerTemplateGenerator.java +++ b/oh-my-scheduler-server/src/main/java/com/github/kfcfans/oms/server/common/utils/ContainerTemplateGenerator.java @@ -37,8 +37,8 @@ public class ContainerTemplateGenerator { if (resource == null) { throw new RuntimeException("generate container template failed, can't find zip file in classpath."); } - String originTemplate = resource.getPath(); - ZipFile zipFile = new ZipFile(originTemplate); + + ZipFile zipFile = new ZipFile(resource.getFile()); String tmpPath = OmsFileUtils.genTemporaryPath(); zipFile.extractAll(tmpPath);