Skip to content

Commit

Permalink
DATAGO-64175: Add proper file separators for the OS (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregmeldrum authored Nov 1, 2023
1 parent 266efe9 commit 8d5cf62
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -118,7 +118,7 @@ private MetaInfFileBO prepareMetaInfJson(List<DataCollectionFileEntity> files, S
List<MetaInfFileDetailsBO> 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 =
Expand Down

0 comments on commit 8d5cf62

Please sign in to comment.