From 8d5cf6202813fb253230c16e01e4ca014f0be5fe Mon Sep 17 00:00:00 2001 From: Greg Meldrum Date: Wed, 1 Nov 2023 13:53:22 -0400 Subject: [PATCH] DATAGO-64175: Add proper file separators for the OS (#129) --- .../maas/ep/event/management/agent/service/ImportService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service/application/src/main/java/com/solace/maas/ep/event/management/agent/service/ImportService.java b/service/application/src/main/java/com/solace/maas/ep/event/management/agent/service/ImportService.java index b77282af..aceb5961 100644 --- a/service/application/src/main/java/com/solace/maas/ep/event/management/agent/service/ImportService.java +++ b/service/application/src/main/java/com/solace/maas/ep/event/management/agent/service/ImportService.java @@ -97,7 +97,7 @@ public InputStream zip(ZipRequestBO zipRequestBO) throws IOException { String message = "Could not find scan files."; log.error(message); return new FileNotFoundException(message); - }).getPath(), "/"); + }).getPath(), File.separator); MetaInfFileBO metaInfJson = prepareMetaInfJson(files, messagingServiceId, emaId, scheduleId, scanId); @@ -118,7 +118,7 @@ private MetaInfFileBO prepareMetaInfJson(List files, S List metaInfFileDetailsBOFiles = new ArrayList<>(); files.forEach(file -> { String filePath = file.getPath(); - String fileName = StringUtils.substringAfterLast(filePath, "/"); + String fileName = StringUtils.substringAfterLast(filePath, File.separator); String dataEntityType = fileName.replace(".json", ""); MetaInfFileDetailsBO metaInfFileDetailsBOFile =