Use makePath to create any missing intermediate directories for app dir

https://github.com/lightpanda-io/browser/issues/486
This commit is contained in:
Karl Seguin
2025-03-22 23:53:46 +08:00
parent 20160cb071
commit 81759fa57a

View File

@@ -67,7 +67,7 @@ fn getAndMakeAppDir(allocator: Allocator) ?[]const u8 {
return null; return null;
}; };
std.fs.makeDirAbsolute(app_dir_path) catch |err| switch (err) { std.fs.cwd().makePath(app_dir_path) catch |err| switch (err) {
error.PathAlreadyExists => return app_dir_path, error.PathAlreadyExists => return app_dir_path,
else => { else => {
allocator.free(app_dir_path); allocator.free(app_dir_path);