]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.acorn/src/org/simantics/acorn/HeadState.java
Fixed acorn head.state writing
[simantics/platform.git] / bundles / org.simantics.acorn / src / org / simantics / acorn / HeadState.java
index 56ef481a7155603f063a328f8f5214bcb759cc22..c20d8e878a4eec04ebaa26ab892efa1790aea431 100644 (file)
@@ -60,12 +60,11 @@ public class HeadState {
     public void save(Path directory) throws IOException {
         Path f = directory.resolve("head.state");
         try {
-            File file = f.toFile();
             BinaryMemory rf = new BinaryMemory(4096);
             try {
                 MutableVariant v = new MutableVariant(Bindings.getBindingUnchecked(HeadState.class), this);
                 Serializer s = Bindings.getSerializerUnchecked( Bindings.VARIANT );
-                s.serialize(v, file);
+                s.serialize(rf, v);
             } finally {
                 rf.close();
             }