This commit is contained in:
Jeffrey Paul 2019-12-19 07:16:13 -08:00
parent 46e022c731
commit 5c1ff3e114
1 changed files with 5 additions and 5 deletions

View File

@ -64,11 +64,11 @@ func (ts *TootFSStorage) TootExists(t toot.Toot) bool {
func (ts *TootFSStorage) StoreToot(t toot.Toot) error { func (ts *TootFSStorage) StoreToot(t toot.Toot) error {
path := t.DiskStoragePath() path := t.DiskStoragePath()
full := ts.root + "/" + path full := ts.root + "/" + path
dir := filepath.Dir(full) dir := filepath.Dir(full)
err := os.MkdirAll(dir, 0755) err := os.MkdirAll(dir, 0755)
if err != nil { if err != nil {
return err return err
} }
return ioutil.WriteFile(full, t.Original, 0644) return ioutil.WriteFile(full, t.Original, 0644)
} }