From 69a26211612b7e9608148350f94e61545f55367c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Briac=20Pilpr=C3=A9?= Date: Mon, 1 Apr 2019 21:30:40 +0200 Subject: [PATCH] Bump to 1.0.4 --- CHANGELOG.md | 7 +++++++ .../net/briac/omegat/plugin/omt/ManageOMTPackage.java | 9 ++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ef1d09..c4cf928 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## [v1.0.4] + +### Changed +- The project is always saved before exporting a package. +- Make sure the path in the zipped entries contains "/" instead of "\". + + ## [v1.0.3] ### Add diff --git a/src/main/java/net/briac/omegat/plugin/omt/ManageOMTPackage.java b/src/main/java/net/briac/omegat/plugin/omt/ManageOMTPackage.java index ad11d1a..d27c3dc 100644 --- a/src/main/java/net/briac/omegat/plugin/omt/ManageOMTPackage.java +++ b/src/main/java/net/briac/omegat/plugin/omt/ManageOMTPackage.java @@ -240,9 +240,12 @@ protected Void doInBackground() throws Exception { mainWindow.showStatusMessageRB("MW_STATUS_SAVING"); + Core.executeExclusively(true, () -> { + Core.getProject().saveProject(true); + }); + if (Boolean.parseBoolean(pluginProps.getProperty(PROPERTY_GENERATE_TARGET, "false"))) { Core.executeExclusively(true, () -> { - Core.getProject().saveProject(true); try { Core.getProject().compileProject(".*"); } catch (Exception ex) { @@ -496,13 +499,13 @@ private static final void addZipDir(final ZipOutputStream out, final Path root, if (child.toFile().listFiles().length == 0) { String emptyDirFile = entry.toString() + File.separatorChar + IGNORE_FILE; Log.logDebug(LOGGER, "addZipDir\tempty\t[{0}]", emptyDirFile); - out.putNextEntry(new ZipEntry(emptyDirFile)); + out.putNextEntry(new ZipEntry(emptyDirFile.replace("\\", "/"))); out.closeEntry(); } addZipDir(out, entry, child, props, filter); } else { Log.logDebug(LOGGER, "addZipDir\tfile\t[{0}]", entry); - out.putNextEntry(new ZipEntry(entry.toString())); + out.putNextEntry(new ZipEntry(entry.toString().replace("\\", "/"))); Files.copy(child, out); out.closeEntry(); }