fix: satisfy lint on prompt file permissions

This commit is contained in:
whoisasx 2026-06-29 17:00:28 +05:30
parent a058c9378e
commit 09b517aea1
1 changed files with 2 additions and 2 deletions

View File

@ -1023,10 +1023,10 @@ func (m *Manager) writeSystemPromptFile(id domain.SessionID, systemPrompt string
return "", nil
}
path := filepath.Join(m.dataDir, "prompts", string(id), "system.md")
if err := os.MkdirAll(filepath.Dir(path), 0700); err != nil {
if err := os.MkdirAll(filepath.Dir(path), 0o700); err != nil {
return "", err
}
if err := os.WriteFile(path, []byte(strings.TrimRight(systemPrompt, "\n")+"\n"), 0600); err != nil {
if err := os.WriteFile(path, []byte(strings.TrimRight(systemPrompt, "\n")+"\n"), 0o600); err != nil {
return "", err
}
return path, nil