Skip to content

Commit

Permalink
core: fix windows compile regression from #4021 (#4212)
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellh authored Dec 31, 2024
2 parents eaa8722 + cf34ffa commit 47cf5cb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Surface.zig
Original file line number Diff line number Diff line change
Expand Up @@ -4242,7 +4242,13 @@ fn writeScreenFile(
const filename = try std.fmt.bufPrint(&filename_buf, "{s}.txt", .{@tagName(loc)});

// Open our scrollback file
var file = try tmp_dir.dir.createFile(filename, .{ .mode = 0o600 });
var file = try tmp_dir.dir.createFile(
filename,
switch (builtin.os.tag) {
.windows => .{},
else => .{ .mode = 0o600 },
},
);
defer file.close();

// Screen.dumpString writes byte-by-byte, so buffer it
Expand Down

0 comments on commit 47cf5cb

Please sign in to comment.