Skip to content

Commit

Permalink
Rollback on aggressive permission changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jguer committed Oct 19, 2017
1 parent a6a0b9b commit a46e6bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ func init() {
defaultSettings(&config)

if _, err = os.Stat(configFile); os.IsNotExist(err) {
err = os.MkdirAll(filepath.Dir(configFile), 0700)
err = os.MkdirAll(filepath.Dir(configFile), 0755)
if err != nil {
fmt.Println("Unable to create config directory:", filepath.Dir(configFile), err)
os.Exit(2)
}
// Save the default config if nothing is found
config.saveConfig()
} else {
file, err := os.OpenFile(configFile, os.O_RDWR|os.O_CREATE, 0600)
file, err := os.OpenFile(configFile, os.O_RDWR|os.O_CREATE, 0644)
if err != nil {
fmt.Println("Error reading config:", err)
} else {
Expand All @@ -105,7 +105,7 @@ func init() {
////////////////
updated = false

file, err := os.OpenFile(vcsFile, os.O_RDWR|os.O_CREATE, 0600)
file, err := os.OpenFile(vcsFile, os.O_RDWR|os.O_CREATE, 0644)
if err == nil {
defer file.Close()
decoder := json.NewDecoder(file)
Expand Down Expand Up @@ -363,7 +363,7 @@ func complete() (err error) {
path := completionFile + config.Shell + ".cache"

if info, err := os.Stat(path); os.IsNotExist(err) || time.Since(info.ModTime()).Hours() > 48 {
os.MkdirAll(filepath.Dir(completionFile), 0700)
os.MkdirAll(filepath.Dir(completionFile), 0755)
out, err := os.Create(path)
if err != nil {
return err
Expand All @@ -378,7 +378,7 @@ func complete() (err error) {
return err
}

in, err := os.OpenFile(path, os.O_RDWR|os.O_CREATE, 0600)
in, err := os.OpenFile(path, os.O_RDWR|os.O_CREATE, 0644)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type Configuration struct {
Devel bool `json:"devel"`
}

var version = "2.116"
var version = "2.201"

// baseURL givers the AUR default address.
const baseURL string = "https://aur.archlinux.org"
Expand Down

0 comments on commit a46e6bf

Please sign in to comment.