From beb6577046746793c655085eaae049d38c23f239 Mon Sep 17 00:00:00 2001 From: Victor Harbo Johnston Date: Thu, 20 Jul 2023 08:55:03 +0200 Subject: [PATCH] Update zip filename --- .../solrwayback/service/SolrWaybackResource.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/dk/kb/netarchivesuite/solrwayback/service/SolrWaybackResource.java b/src/main/java/dk/kb/netarchivesuite/solrwayback/service/SolrWaybackResource.java index e9f9daaa..13716e52 100644 --- a/src/main/java/dk/kb/netarchivesuite/solrwayback/service/SolrWaybackResource.java +++ b/src/main/java/dk/kb/netarchivesuite/solrwayback/service/SolrWaybackResource.java @@ -482,8 +482,9 @@ private String createZipFilename(String contentType) { Date date = new Date() ; SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); - String filename = dateFormat.format(date) + "_" + contentType.replaceAll(" ", "") - .replaceAll("/", "_") + "_export.zip"; + String filename = dateFormat.format(date) + "_" + contentType.replaceAll(" OR ", "_or_") + .replaceAll(" ", "") + .replaceAll("/", "_") + "_export.zip"; filename = Normalizer.normalize(filename, Normalizer.Form.NFD); return filename.replaceAll("[^\\x00-\\x7F]", "");