mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-19 05:50:27 +00:00
cli: make the entire +ssh-cache cache path (#9403)
std.fs.makeDirAbsolute() only creates the last directory. We instead need Dir.makePath() to make the entire path, including intermediate directories. This fixes the problem where a missing $XDG_STATE_HOME directory (e.g. ~/.local/state/) would prevent our ssh cache file from being created. Fixes #9393
This commit is contained in:
@@ -70,7 +70,7 @@ pub fn add(
|
||||
|
||||
// Create cache directory if needed
|
||||
if (std.fs.path.dirname(self.path)) |dir| {
|
||||
std.fs.makeDirAbsolute(dir) catch |err| switch (err) {
|
||||
std.fs.cwd().makePath(dir) catch |err| switch (err) {
|
||||
error.PathAlreadyExists => {},
|
||||
else => return err,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user