Skip to content

Commit

Permalink
write_*_file actions default to mode 0600
Browse files Browse the repository at this point in the history
This commit changes the default filemode for the write actions so that
it is only readable and writable by the user running Ghostty.
  • Loading branch information
mitchellh committed Dec 31, 2024
1 parent a30b2ed commit d59a57e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Surface.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d59a57e

Please sign in to comment.