Skip to content

Commit 78db66d

Browse files
committed
Fix boneheaded if.
1 parent 8b9bcac commit 78db66d

File tree

1 file changed

+2
-2
lines changed
  • jvm/selfie-lib/src/commonMain/kotlin/com/diffplug/selfie

1 file changed

+2
-2
lines changed

jvm/selfie-lib/src/commonMain/kotlin/com/diffplug/selfie/VcrSelfie.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ internal constructor(
6565
init {
6666
val canWrite = Selfie.system.mode.canWrite(isTodo = false, call, Selfie.system)
6767
if (canWrite) {
68+
state = State.Write()
69+
} else {
6870
val snapshot =
6971
disk.readDisk(sub, call)
7072
?: throw Selfie.system.fs.assertFailed(Selfie.system.mode.msgVcrSnapshotNotFound())
@@ -81,8 +83,6 @@ internal constructor(
8183
frames.add(keyAfterNum to value)
8284
}
8385
state = State.Read(frames)
84-
} else {
85-
state = State.Write()
8686
}
8787
}
8888
override fun close() {

0 commit comments

Comments
 (0)