From: Jussi Koskela Date: Mon, 12 Mar 2018 07:35:47 +0000 (+0200) Subject: Truncate file after writing DataContainer to it X-Git-Tag: v1.43.0~136^2~549 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F54%2F1554%2F1;p=simantics%2Fplatform.git Truncate file after writing DataContainer to it refs #7810 Change-Id: I5ab3f7b1e173b22f1183d4c1fbef1d5d260030e4 --- diff --git a/bundles/org.simantics.databoard/src/org/simantics/databoard/container/DataContainers.java b/bundles/org.simantics.databoard/src/org/simantics/databoard/container/DataContainers.java index 4a74e2e50..21e54d897 100644 --- a/bundles/org.simantics.databoard/src/org/simantics/databoard/container/DataContainers.java +++ b/bundles/org.simantics.databoard/src/org/simantics/databoard/container/DataContainers.java @@ -232,6 +232,7 @@ public class DataContainers { BinaryFile wf = new BinaryFile( output); try { writeFile(wf, container); + wf.setLength(wf.position()); } finally { wf.close(); }