From 5aa1b409f2248def49adae1da180f641e5fe7924 Mon Sep 17 00:00:00 2001 From: TechCrafter07 Date: Wed, 10 Mar 2021 08:55:39 +0100 Subject: [PATCH] no special characters --- src/main/java/sh/adb/sensorCommunityAPI/DataStoreBot.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/sh/adb/sensorCommunityAPI/DataStoreBot.java b/src/main/java/sh/adb/sensorCommunityAPI/DataStoreBot.java index ec26558..3ce31f1 100644 --- a/src/main/java/sh/adb/sensorCommunityAPI/DataStoreBot.java +++ b/src/main/java/sh/adb/sensorCommunityAPI/DataStoreBot.java @@ -53,7 +53,9 @@ public class DataStoreBot { //get timestamp String timestamp = (String) entry.get("timestamp"); - String path = this.storePath + country + "-" + sensorID + "-" + timestamp + ".json";; + String path = this.storePath + country + "-" + sensorID + "-" + timestamp + ".json"; + path = path.replace(":", "-"); + path = path.replace(" ", "-"); this.store.storeJSON(path, entry); } }