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;
}
}
-
}
}