X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.acorn%2Fsrc%2Forg%2Fsimantics%2Facorn%2FClusterManager.java;h=3cbb64977ae203d3f55efa879e8ec56331477be6;hb=72f8e583b6884a32f6731bf6f16cd6470a2b5c06;hp=51db52efc55a43108df3939b5bd23561700b6784;hpb=0580ea8b675c868685993b0780c9ecc31010f681;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.acorn/src/org/simantics/acorn/ClusterManager.java b/bundles/org.simantics.acorn/src/org/simantics/acorn/ClusterManager.java index 51db52efc..3cbb64977 100644 --- a/bundles/org.simantics.acorn/src/org/simantics/acorn/ClusterManager.java +++ b/bundles/org.simantics.acorn/src/org/simantics/acorn/ClusterManager.java @@ -70,7 +70,7 @@ public class ClusterManager { info.acquireMutex(); try { info.makeResident(); - return info.getCSSIds(); + return info.getCCSIds(); } finally { info.releaseMutex(); } @@ -143,7 +143,7 @@ public class ClusterManager { // Cluster files are always there // Nothing has been written => no need to do anything long amountOfFiles = countFiles(workingDirectory); - if(!fullSave && amountOfFiles < 3) { + if(!fullSave && amountOfFiles == 0) { // System.err.println("amountOfFiles < 3"); return false; } @@ -163,14 +163,14 @@ public class ClusterManager { if (!safeToMakeSnapshot.get()) throw cause; + ClusterSetsSupport cssi = locator.getService(ClusterSetsSupport.class); + cssi.save(); + persistHeadState(); - + if (fullSave) mainState.save(dbFolder); - ClusterSetsSupport cssi = locator.getService(ClusterSetsSupport.class); - cssi.save(); - amountOfFiles = countFiles(workingDirectory); System.err.println(" -finished: amount of files is " + amountOfFiles);