mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-28 22:53:28 +00:00
Merge pull request #280 from lightpanda-io/cdpdump-close-dir
cdp: close dir in dumpFile
This commit is contained in:
@@ -148,7 +148,8 @@ pub fn dumpFile(
|
||||
) !void {
|
||||
const name = try std.fmt.allocPrint(alloc, "id_{d}.js", .{id});
|
||||
defer alloc.free(name);
|
||||
const dir = try std.fs.cwd().makeOpenPath("zig-cache/tmp", .{});
|
||||
var dir = try std.fs.cwd().makeOpenPath("zig-cache/tmp", .{});
|
||||
defer dir.close();
|
||||
const f = try dir.createFile(name, .{});
|
||||
defer f.close();
|
||||
const nb = try f.write(script);
|
||||
|
||||
Reference in New Issue
Block a user