Skip to content
This repository was archived by the owner on Jun 14, 2018. It is now read-only.

Commit f617f37

Browse files
committed
BUG: Don't crash on initial startup with missing ~/.mole
1 parent f797299 commit f617f37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/mole/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ func ensureHome() {
143143
} else if err != nil {
144144
fatalErr(err)
145145
}
146-
if fi.Mode()&0077 != 0 {
146+
if err == nil && fi.Mode()&0077 != 0 {
147147
err := os.Chmod(homeDir, 0700)
148148
fatalErr(err)
149149
okln("Corrected permissions on", homeDir)

0 commit comments

Comments
 (0)