From ca0f4eb1114af9a04ee46dcd8626132f0dff786d Mon Sep 17 00:00:00 2001 From: Marko Luukkainen Date: Wed, 17 Aug 2022 18:42:07 +0300 Subject: [PATCH] Exporting TG files creates temporary files without removing them. gitlab #858 Change-Id: Ie0da930769e275f72577363fef98bdc65ea69ff4 --- .../src/org/simantics/graph/db/TransferableGraphs.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bundles/org.simantics.graph.db/src/org/simantics/graph/db/TransferableGraphs.java b/bundles/org.simantics.graph.db/src/org/simantics/graph/db/TransferableGraphs.java index 7b1a17704..42bae14bf 100644 --- a/bundles/org.simantics.graph.db/src/org/simantics/graph/db/TransferableGraphs.java +++ b/bundles/org.simantics.graph.db/src/org/simantics/graph/db/TransferableGraphs.java @@ -494,7 +494,7 @@ public class TransferableGraphs { private static void writeTransferableGraph(RequestProcessor processor, final TransferableGraphSource source, final RandomAccessBinary out, TGStatusMonitor monitor) throws Exception { long start = System.nanoTime(); - + try { final Serializer datatypeSerializer = Bindings.getSerializerUnchecked(Datatype.class); final Serializer identitySerializer = Bindings.getSerializerUnchecked(Identity.class); final Serializer extensionSerializer = Bindings.getSerializerUnchecked(Extensions.class); @@ -595,6 +595,9 @@ public class TransferableGraphs { } } }); + } finally { + source.close(); + } long end = System.nanoTime(); LOGGER.info("Wrote transferable graph in {} seconds.", 1e-9*(end-start)); -- 2.45.2