diff options
Diffstat (limited to 'core/Effect.zig')
| -rw-r--r-- | core/Effect.zig | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/core/Effect.zig b/core/Effect.zig index 4d2009fb..bc952b8b 100644 --- a/core/Effect.zig +++ b/core/Effect.zig @@ -112,9 +112,8 @@ comptime { std.debug.assert(@sizeOf(@FieldType(Effect, "write")) <= @sizeOf(@FieldType(Effect, "spawn"))); } -pub fn perform(p: *Pardes, e: Effect) void { - const taped = tape.enter(p, .{ .perform = e }); - defer tape.leave(p, taped); +pub const perform = tape.taped(performInner); +fn performInner(p: *Pardes, e: Effect) void { // A Save performed on one twin is every twin's (File.syncTwins). defer panes.File.syncTwins(p); const v = p.host.vtable; @@ -280,7 +279,7 @@ pub fn writeChecked(p: *Pardes, id: u8, serial: u32, path: []const u8, bytes: [] // A Save makes the directories its file goes in, and any above them, // first: one rule, for the pane's own name and `Save path` alike. A // directory it cannot make leaves the write to fail and say why. - if (filesystem.localPath(path)) |local| filesystem.makeDirs(std.Io.Dir.path.dirname(local) orelse "/"); + if (filesystem.localPath(path)) |local| filesystem.makeDirs(p.tape, std.Io.Dir.path.dirname(local) orelse "/"); // The in-process filesystem reports the same way a real host does, // so an OOM there leaves the pane dirty rather than looking saved. if (p.host.vtable.write_file) |f| f(p.host.ctx, id, path, bytes) else if (!p.fallback.writeFile(path, bytes)) p.saveFailed(id, path, error.OutOfMemory); |
