summaryrefslogtreecommitdiff
path: root/src/builtins.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-30 14:02:59 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:17 -0300
commitb43866d6ab784e518df8dbef374147367358ada9 (patch)
treeb49ffadf36cac764cb3fb6f4d343fa25d09dab73 /src/builtins.zig
parent9ca008a27c4ab83a29c1798f4eb081eef372624c (diff)
downloadpardes-b43866d6ab784e518df8dbef374147367358ada9.tar.gz
pardes-b43866d6ab784e518df8dbef374147367358ada9.zip
Save makes the directories its file goes in, always: for the pane's own name and Save path alike
Whether a Save made missing directories depended on how the name had come about. Config's pane did, a name written into a missing directory did (since kkrqxtsp), and `Save path` and every other name did not, failing ENOENT instead. There is now one rule: a Save makes the parent directories of the file it writes, a pane's own or a terminal's scrollback included, and the make_dirs flag is gone. A directory it cannot make still fails the write with why, as fs.py's /nonexistent-pardes-dir case shows. fs.py now also saves into missing directories by Save path and by a written name. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/builtins.zig')
-rw-r--r--src/builtins.zig3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/builtins.zig b/src/builtins.zig
index 8fe49649..5a2037cf 100644
--- a/src/builtins.zig
+++ b/src/builtins.zig
@@ -1304,9 +1304,8 @@ pub const Config = struct {
// Not there yet: a pane named for it, which Save makes.
const free = c.p.freeSlot() orelse return c.p.reportError(c.id, "Config", error.NoPaneSlots);
c.p.newScratchFor(c.id, .scratch);
- const pane = c.p.panes[free] orelse return;
+ if (c.p.panes[free] == null) return;
@import("ninep/pane.zig").nameBuffer(c.p, free, path, false) catch |err| return c.p.reportError(c.id, "Config", err);
- pane.file.?.make_dirs = true;
c.p.active = free;
}
};