X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.acorn%2Fsrc%2Forg%2Fsimantics%2Facorn%2FMainState.java;h=7d158042173089a2034a3b2e5953fc1423fb6e7c;hb=c125a1755cc7c4a6241c3c5bf841c3db0ff2d658;hp=ec8451cca78adfef37ea4377cd1fad26e2eff89f;hpb=0580ea8b675c868685993b0780c9ecc31010f681;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.acorn/src/org/simantics/acorn/MainState.java b/bundles/org.simantics.acorn/src/org/simantics/acorn/MainState.java index ec8451cca..7d1580421 100644 --- a/bundles/org.simantics.acorn/src/org/simantics/acorn/MainState.java +++ b/bundles/org.simantics.acorn/src/org/simantics/acorn/MainState.java @@ -157,15 +157,16 @@ public class MainState implements Serializable { for (Path p : reverseSortedPaths) { if (!p.equals(latest)) { - // this indicates that there is a possibility that index and vg's are out of sync - // if we are able to find folders with higher number than the current head.state - callback.accept(null); + if (Files.exists(p.resolve(HeadState.HEAD_STATE))) { + // this indicates that there is a possibility that index and vg's are out of sync + // if we are able to find folders with higher number than the current head.state + callback.accept(null); + } uncheckedDeleteAll(p); } else { break; } } - } }