make .ttbp readable

This commit is contained in:
nbsp 2026-01-08 01:19:57 +01:00
parent 8f7eebb035
commit e0e7ebfa28
3 changed files with 3 additions and 2 deletions

View File

@ -0,0 +1 @@
patch type="fixed" "make new .ttbp/ world-readable"

View File

@ -140,7 +140,7 @@ func (management *Management) Draw(state *ui.State) {
func purgeFeels() {
ttbp.Unpublish()
os.RemoveAll(ttbp.PathUserEntries)
os.MkdirAll(ttbp.PathUserEntries, 0700)
os.MkdirAll(ttbp.PathUserEntries, 0755)
}
func wipeAccount() {

View File

@ -40,7 +40,7 @@ press ↵ to set up an account, or Ctrl+c to quit. you can always come back late
header := strings.ReplaceAll(header, "%USER%", user.Username)
header = strings.ReplaceAll(header, "%DATETIME%", time.Now().Format(time.DateTime))
os.MkdirAll(ttbp.PathUserConfig, 0755)
os.MkdirAll(ttbp.PathUserEntries, 0700)
os.MkdirAll(ttbp.PathUserEntries, 0755)
os.WriteFile(path.Join(ttbp.PathUserConfig, "header.txt"), []byte(header), 0644)
os.WriteFile(path.Join(ttbp.PathUserConfig, "footer.txt"), footer, 0644)
os.WriteFile(path.Join(ttbp.PathUserConfig, "style.css"), style, 0644)