From 4aed82b2cfa765e75aee3abd6b7ae27bf547a905 Mon Sep 17 00:00:00 2001 From: zhaojunxia Date: Mon, 26 Sep 2022 15:54:30 +0800 Subject: [PATCH] fix:update packag plugin Signed-off-by: zhaojunxia --- .../src/com/sk/dialog/GenerateDialogPane.java | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/napi_IntelliJ_plugin/src/com/sk/dialog/GenerateDialogPane.java b/napi_IntelliJ_plugin/src/com/sk/dialog/GenerateDialogPane.java index 25622675..361bef0f 100644 --- a/napi_IntelliJ_plugin/src/com/sk/dialog/GenerateDialogPane.java +++ b/napi_IntelliJ_plugin/src/com/sk/dialog/GenerateDialogPane.java @@ -215,23 +215,21 @@ public class GenerateDialogPane extends JDialog { tmpDirFile += "napi_generator-macos"; } File file = new File(tmpDirFile); - if (!file.exists()) { - try (InputStream inputStream = getClass().getClassLoader().getResourceAsStream(execFn)) { - if (inputStream == null) { - throw new IOException("exec File InputStream is Null"); - } - byte[] bs = inputStream.readAllBytes(); - writeTmpFile(tmpDirFile, bs); - if (sysName.contains("LINUX") || sysName.contains("MAC OS")) { - executable(tmpDirFile); - } - } catch (IOException | InterruptedException e) { - GenNotification.notifyMessage(this.project, e.getMessage(), "Can not Find File:" + execFn, - NotificationType.ERROR); - LOG.error(e); - - return ""; + try (InputStream inputStream = getClass().getClassLoader().getResourceAsStream(execFn)) { + if (inputStream == null) { + throw new IOException("exec File InputStream is Null"); + } + byte[] bs = inputStream.readAllBytes(); + writeTmpFile(tmpDirFile, bs); + if (sysName.contains("LINUX") || sysName.contains("MAC OS")) { + executable(tmpDirFile); } + } catch (IOException | InterruptedException e) { + GenNotification.notifyMessage(this.project, e.getMessage(), "Can not Find File:" + execFn, + NotificationType.ERROR); + LOG.error(e); + + return ""; } String command = file.toString(); String inArgs = genInArgs(); -- Gitee