core: fix windows compile regression from #4021 (#4212)

pull/4205/head
Mitchell Hashimoto 2024-12-31 11:16:10 -08:00 committed by GitHub
commit 47cf5cbb40
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 1 deletions

View File

@ -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