Source:
<code>public String doExport(DataTransferExportModel exportModel) throws java.io.IOException { String zipLocation = new StringBuilder().append(System.getProperty("java.io.tmpdir")) .append(File.separator) .append(FILE_PATH) .append(File.separator) .append(EXPORT_FILE_NAME) .toString() .replace("\\", "/"); Predicate<Path> readmeFilter = p -> p.toString().toLowerCase().endsWith("readme.md"); Predicate<Path> datasetsFilter = def -> true; Predicate<Path> pagesFilter = page -> true; boolean exportNavigation = true; if (!exportModel.isExportAll()) { datasetsFilter = filterDatasets(exportModel.getDatasetDefinitions()); pagesFilter = filterPages(exportModel.getPages()); exportNavigation = exportModel.isExportNavigation(); } new File(zipLocation).getParentFile().mkdirs(); FileOutputStream fos = new FileOutputStream(zipLocation); ZipOutputStream zos = new ZipOutputStream(fos); zipFileSystem(datasetsFS, zos, readmeFilter.or(datasetsFilter)); zipFileSystem(perspectivesFS, zos, readmeFilter.or(pagesFilter)); if (exportNavigation) { zipFileSystem(navigationFS, zos, p -> true); } else { zipFileSystem(navigationFS, zos, readmeFilter); } String componentsPath = externalComponentLoader.getExternalComponentsDir(); if (componentsPath != null) { <START> zipComponents(Paths.get("file:" + componentsPath), <END> zos, p -> true); } zipFile(createVersionFile(), "VERSION", zos); zos.close(); fos.close(); moveZipToFileSystem(zipLocation, systemFS); return new StringBuilder().append(SpacesAPI.Scheme.GIT) .append("://") .append(systemFS.getName()) .append(File.separator) .append(FILE_PATH) .append(File.separator) .append(EXPORT_FILE_NAME) .toString() .replace("\\", "/"); }</code><technical_language>suggestion zipComponents(Paths.get("file://" + componentsPath), work double slashes</technical_language>

Target:
public String doExport(DataTransferExportModel exportModel) throws java.io.IOException { String zipLocation = new StringBuilder().append(System.getProperty("java.io.tmpdir")) .append(File.separator) .append(FILE_PATH) .append(File.separator) .append(EXPORT_FILE_NAME) .toString() .replace("\\", "/"); Predicate<Path> readmeFilter = p -> p.toString().toLowerCase().endsWith("readme.md"); Predicate<Path> datasetsFilter = def -> true; Predicate<Path> pagesFilter = page -> true; boolean exportNavigation = true; if (!exportModel.isExportAll()) { datasetsFilter = filterDatasets(exportModel.getDatasetDefinitions()); pagesFilter = filterPages(exportModel.getPages()); exportNavigation = exportModel.isExportNavigation(); } new File(zipLocation).getParentFile().mkdirs(); FileOutputStream fos = new FileOutputStream(zipLocation); ZipOutputStream zos = new ZipOutputStream(fos); zipFileSystem(datasetsFS, zos, readmeFilter.or(datasetsFilter)); zipFileSystem(perspectivesFS, zos, readmeFilter.or(pagesFilter)); if (exportNavigation) { zipFileSystem(navigationFS, zos, p -> true); } else { zipFileSystem(navigationFS, zos, readmeFilter); } String componentsPath = externalComponentLoader.getExternalComponentsDir(); if (componentsPath != null) { zipComponents(Paths.get("file://" + componentsPath), zos, p -> true); } zipFile(createVersionFile(), "VERSION", zos); zos.close(); fos.close(); moveZipToFileSystem(zipLocation, systemFS); return new StringBuilder().append(SpacesAPI.Scheme.GIT) .append("://") .append(systemFS.getName()) .append(File.separator) .append(FILE_PATH) .append(File.separator) .append(EXPORT_FILE_NAME) .toString() .replace("\\", "/"); }