This commit is contained in:
Jeffrey Paul 2019-12-19 07:16:13 -08:00
parent 46e022c731
commit 5c1ff3e114

View File

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