From 32198b59020e295efbc48de343a9de69c952dcfc Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 05:15:57 -0300 Subject: A Save that fails logs its err, not a save record The save record was logged as soon as the host was asked to write, so a Save into a read-only directory logged save and then failed. It is now logged only once the write is done; a failure's err record (the write's, naming the path) stands alone, the msg it was also said as dropped. Co-Authored-By: Claude Opus 5.5 --- src/9p_io.zig | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/9p_io.zig') diff --git a/src/9p_io.zig b/src/9p_io.zig index 72963e08..bda1ad36 100644 --- a/src/9p_io.zig +++ b/src/9p_io.zig @@ -316,6 +316,9 @@ pub const Listener = struct { // settle in the same wait is told to this write too. if (l.core == core and core.fs.late_failure_len != 0) { const failed = pardes.ctlfs.failText(req.tag, pardes.ctlfs.E.IO, core.fs.late_failure[0..core.fs.late_failure_len]); + // Its err record says it (the path in it); the msg the failure + // was also said as goes, as a builtin's failing a write does. + pardes.ctlfs.events.dropMessage(core, core.fs.late_failure[0..core.fs.late_failure_len]); pardes.ctlfs.events.noteError(core, req, failed); return conn.reply(&failed, ""); } -- cgit v1.3