`write_*_file` actions default to mode 0600 (#4201)

This commit changes the default filemode for the write actions so that
it is only readable and writable by the user running Ghostty.
pull/4209/head
Mitchell Hashimoto 2024-12-31 07:20:28 -08:00 committed by GitHub
commit eaa872216b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -4242,7 +4242,7 @@ 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, .{});
var file = try tmp_dir.dir.createFile(filename, .{ .mode = 0o600 });
defer file.close();
// Screen.dumpString writes byte-by-byte, so buffer it