diff options
Diffstat (limited to 'src/dump.zig')
| -rw-r--r-- | src/dump.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dump.zig b/src/dump.zig index 3269cc59..971a4d26 100644 --- a/src/dump.zig +++ b/src/dump.zig @@ -851,7 +851,8 @@ pub fn reviveSlot(p: *Pardes, id: usize, s: *Kind.Slot) void { s.ops = p.kinds.ops[k]; s.gen = p.kinds.kinds[k].gen; // A replica has no code to read it for: the authority's outcome is taped. - const bytes: ?[]u8 = if (s.ops != null and s.path.len > 0) filesystem.read(p, s.path) catch null else null; + // The authority's code may not be loaded yet: its open loads it. + const bytes: ?[]u8 = if ((s.ops != null or !pardes.tape.replaying()) and s.path.len > 0) filesystem.read(p, s.path) catch null else null; defer if (bytes) |b| p.gpa.free(b); const kept = .{ s.next_tick, s.views, s.focused }; if (!Kind.reopen(p, id, s, bytes)) { |
