summaryrefslogtreecommitdiff
path: root/src/fs.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs.zig')
-rw-r--r--src/fs.zig5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fs.zig b/src/fs.zig
index e4373bf0..4bbf09bb 100644
--- a/src/fs.zig
+++ b/src/fs.zig
@@ -921,7 +921,7 @@ pub fn readLimit(p: *pardes.Pardes, path: []const u8, max_bytes: usize) ![]u8 {
if (!std.mem.eql(u8, name, mount.name)) continue;
// A peer answers on its own time, and the peer may be this very
// editor: the turn goes out with the request.
- return pardes.tape.site(.read_mount, p.gpa, ninep_io.Client.readLimit, .{ p.gpa, mount.dial, remote_path, path, limit });
+ return pardes.tape.site(.read_mount, p.gpa, ninep_io.Client.readMount, .{ p.gpa, mount.dial, remote_path, path, limit });
}
return error.FileNotFound;
}
@@ -1009,7 +1009,7 @@ fn writeOut(p: *pardes.Pardes, dial: ?[]const u8, path: []const u8, bytes: []con
defer p.gpa.free(copy);
pardes.turn.rest();
defer pardes.turn.wake();
- if (dial) |d| return ninep_io.Client.write(p.gpa, d, path, copy);
+ if (dial) |d| return ninep_io.Client.writeMount(p.gpa, d, path, copy);
return writeFile(path, copy);
}
@@ -1542,6 +1542,7 @@ pub fn unmount(p: *Pardes, name: []const u8) !void {
(path.len == prefix.len or path[prefix.len] == '/')) return error.MountInUse;
}
const removed = p.fs.mounts.orderedRemove(index);
+ if (comptime pardes.hosted) ninep_io.Client.forget(removed.dial);
p.gpa.free(removed.name);
p.gpa.free(removed.dial);
return;