Skip to content

Commit

Permalink
fix: make entity dump filename windows compatible (#5145)
Browse files Browse the repository at this point in the history
- 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 ('-')
  • Loading branch information
jdrueckert authored Oct 18, 2023
1 parent 1494c02 commit 254db60
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 254db60

Please sign in to comment.