diff --git a/src/main/java/org/gcube/data_catalogue/grsf_publish_ws/utils/threads/ManageTimeSeriesThread.java b/src/main/java/org/gcube/data_catalogue/grsf_publish_ws/utils/threads/ManageTimeSeriesThread.java index 6857f76..de06759 100644 --- a/src/main/java/org/gcube/data_catalogue/grsf_publish_ws/utils/threads/ManageTimeSeriesThread.java +++ b/src/main/java/org/gcube/data_catalogue/grsf_publish_ws/utils/threads/ManageTimeSeriesThread.java @@ -164,8 +164,7 @@ public class ManageTimeSeriesThread extends Thread{ char firstLetter = productName.charAt(0); // the whole path of the directory is going to be... - productName = replaceIllegalChars(productName); - String csvDirectoryForThisProduct = recordTypeFolderName + PATH_SEPARATOR + firstLetter + PATH_SEPARATOR + productName + PATH_SEPARATOR + "csv"; + String csvDirectoryForThisProduct = recordTypeFolderName + PATH_SEPARATOR + firstLetter + PATH_SEPARATOR + replaceIllegalChars(productName) + PATH_SEPARATOR + "csv"; logger.debug("The path under which the time series are going to be saved is " + csvDirectoryForThisProduct); WorkspaceFolder csvFolder = HelperMethods.createOrGetSubFoldersByPath(catalogueFolder, csvDirectoryForThisProduct); @@ -188,7 +187,7 @@ public class ManageTimeSeriesThread extends Thread{ CustomField customAnnotation = field.getAnnotation(CustomField.class); logger.debug("A time series has been just found (from field " + customAnnotation.key() + ")"); - String resourceToAttachName = (productName + "_" + customAnnotation.key()).replaceAll("\\s", "_").replaceAll("[_]+", "_") + CSV_FILE_FORMAT; + String resourceToAttachName = (replaceIllegalChars(productName) + "_" + customAnnotation.key()).replaceAll("\\s", "_").replaceAll("[_]+", "_") + CSV_FILE_FORMAT; String resourceToAttachDescription = productName + " : " + customAnnotation.key() + " time series"; File csvFile = CSVHelpers.listToCSV(asList);