Fix migration issue for split and zipped model files
diff --git a/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/MigrationHelper.java b/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/MigrationHelper.java index 0f6f3e8..8b67526 100644 --- a/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/MigrationHelper.java +++ b/plugins/org.eclipse.app4mc.amalthea.converters.common/src/org/eclipse/app4mc/amalthea/converters/common/MigrationHelper.java
@@ -464,9 +464,10 @@ Path inputPath = Paths.get(input.toURI()); byte[] buffer = new byte[1024]; try (ZipInputStream zis = new ZipInputStream(Files.newInputStream(inputPath))) { - // use the filename of the input file instead of the name of the zipentry to - // handle cases where multiple zipped model files are located in the same folder - // and contain model files with the same filename, e.g. SCA2Amalthea results + // read next ZIP file entry and position the stream at the beginning of the entry data + zis.getNextEntry(); + // use the filename of the input file to handle cases where multiple zipped model files + // are located in the same folder (Zip entry name is typically "ResourceContents") Path unzipped = Paths.get(inputPath.getParent().toString(), UNZIPPED_PREFIX + input.getName()); try (OutputStream fos = Files.newOutputStream(unzipped)) { int len;