From 254db60dd4e55190895e620a99d6d90efcfcb14b Mon Sep 17 00:00:00 2001 From: jdrueckert Date: Wed, 18 Oct 2023 23:24:59 +0200 Subject: [PATCH] fix: make entity dump filename windows compatible (#5145) - windows doesn't allow colons (':') in filenames - so far the filename included the timestamp in format YYYY-MM-DDTHH:MM:SS.MSZ, e.g. 2023-09-28T17:01:31.685172Z-entityDump.json - now colons will be replaced by dashes ('-') --- .../terasology/engine/logic/console/commands/CoreCommands.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/src/main/java/org/terasology/engine/logic/console/commands/CoreCommands.java b/engine/src/main/java/org/terasology/engine/logic/console/commands/CoreCommands.java index eb3c0621bb6..5a13e239daf 100644 --- a/engine/src/main/java/org/terasology/engine/logic/console/commands/CoreCommands.java +++ b/engine/src/main/java/org/terasology/engine/logic/console/commands/CoreCommands.java @@ -479,7 +479,7 @@ public String dumpEntities(@CommandParam(value = "componentNames", required = fa PrefabSerializer prefabSerializer = new PrefabSerializer(engineEntityManager.getComponentLibrary(), engineEntityManager.getTypeSerializerLibrary()); WorldDumper worldDumper = new WorldDumper(engineEntityManager, prefabSerializer); - Path outFile = PathManager.getInstance().getHomePath().resolve(Instant.now() + "-entityDump.json"); + Path outFile = PathManager.getInstance().getHomePath().resolve(Instant.now().toString().replaceAll(":", "-") + "-entityDump.json"); if (componentNames.length == 0) { savedEntityCount = worldDumper.save(outFile); } else {