diff --git a/.gitignore b/.gitignore index 489ef03..a9a46b9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ main saved_notes +static diff --git a/internal/conf/conf.go b/internal/conf/conf.go index e34c911..f8feeec 100644 --- a/internal/conf/conf.go +++ b/internal/conf/conf.go @@ -20,7 +20,7 @@ type Asset struct { func (asset *Asset) FetchIfNotExists(staticPath string) { destPath := filepath.Join(staticPath, asset.Path) - err := os.MkdirAll(path.Dir(destPath), os.ModeDir|0777) + err := os.MkdirAll(path.Dir(destPath), os.FileMode(0750)) if err != nil { log.Printf("Couldn't create parent dirs of %s\n", destPath) panic(err) @@ -82,8 +82,6 @@ func LoadConfig(path string) { log.Fatal(err) } - os.Mkdir(Conf.Static.Dir, os.FileMode(750)) - for _, asset := range Conf.Static.Assets { asset.FetchIfNotExists(Conf.Static.Dir) }