Skip to content

Commit bd75240

Browse files
committed
chore: address cian's file permission comments
1 parent 03c6f16 commit bd75240

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/screentracker/pty_conversation.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,13 +573,13 @@ func (c *PTYConversation) SaveState() error {
573573

574574
// Create directory if it doesn't exist
575575
dir := filepath.Dir(stateFile)
576-
if err := os.MkdirAll(dir, 0o755); err != nil {
576+
if err := os.MkdirAll(dir, 0o700); err != nil {
577577
return xerrors.Errorf("failed to create state directory: %w", err)
578578
}
579579

580580
// Write to temp file
581581
tempFile := stateFile + ".tmp"
582-
if err := os.WriteFile(tempFile, data, 0o644); err != nil {
582+
if err := os.WriteFile(tempFile, data, 0o600); err != nil {
583583
return xerrors.Errorf("failed to write temp state file: %w", err)
584584
}
585585

0 commit comments

Comments
 (0)