1
1
Fork 0
mirror of https://github.com/schollz/croc.git synced 2025-10-11 13:21:00 +02:00

add missing execute bit for config dir

This commit is contained in:
Zack Scholl 2018-10-23 06:19:53 -07:00
parent 8ae342e128
commit 562925b5e5

View file

@ -67,14 +67,14 @@ func SaveDefaultConfig() error {
if err != nil {
return err
}
os.MkdirAll(path.Join(homedir, ".config", "croc"), 0644)
os.MkdirAll(path.Join(homedir, ".config", "croc"), 0755)
c := defaultConfig()
buf := new(bytes.Buffer)
toml.NewEncoder(buf).Encode(c)
confTOML := buf.String()
err = ioutil.WriteFile(path.Join(homedir, ".config", "croc", "config.toml"), []byte(confTOML), 0644)
if err == nil {
fmt.Printf("Default config file written at '%s'", filepath.Clean(path.Join(homedir, ".config", "croc", "config.toml")))
fmt.Printf("Default config file written at '%s'\r\n", filepath.Clean(path.Join(homedir, ".config", "croc", "config.toml")))
}
return err
}