Create zone data directory upon saving (#4)

This commit is contained in:
Sir Code 2021-06-07 08:42:44 -04:00 committed by GitHub
parent 01d97ac428
commit 79bb14cdbe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -157,6 +157,7 @@ public class Zone {
public void save() throws Exception {
File dataDir = new File("zones\\" + documentId);
dataDir.mkdirs();
ObjectMapper mapper = new ObjectMapper();
mapper.writerWithDefaultPrettyPrinter().writeValue(new File(dataDir, "config.json"), this);
chunkManager.saveModifiedChunks();