Fix file permissions issues
This commit is contained in:
parent
2c0a3c7d80
commit
532b9f2bbb
2 changed files with 2 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,2 +1,3 @@
|
|||
main
|
||||
saved_notes
|
||||
static
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue