From 2a897f877db8a92b4ab43a0c93e885ab682f2c53 Mon Sep 17 00:00:00 2001 From: David Caruana Date: Mon, 23 Jan 2006 18:51:32 +0000 Subject: [PATCH] Fix to handle .acp files which have been updated with via a zip tool. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2180 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../alfresco/repo/importer/ACPImportPackageHandler.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/java/org/alfresco/repo/importer/ACPImportPackageHandler.java b/source/java/org/alfresco/repo/importer/ACPImportPackageHandler.java index ad9d171df3..a057409cf3 100644 --- a/source/java/org/alfresco/repo/importer/ACPImportPackageHandler.java +++ b/source/java/org/alfresco/repo/importer/ACPImportPackageHandler.java @@ -122,7 +122,14 @@ public class ACPImportPackageHandler ZipEntry zipEntry = zipFile.getEntry(content); if (zipEntry == null) { - throw new ImporterException("Failed to find content " + content + " within zip package"); + // Note: for some reason, when modifying a zip archive the path seperator changes + // TODO: Need to investigate further as to why and whether this workaround is enough + content = content.replace('\\', '/'); + zipEntry = zipFile.getEntry(content); + if (zipEntry == null) + { + throw new ImporterException("Failed to find content " + content + " within zip package"); + } } try