diff options
author | Jakob Unterwurzacher | 2017-05-14 14:30:50 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2017-05-14 14:30:50 +0200 |
commit | c44389d9422f31e0b462d1bcd47f80e95913cb60 (patch) | |
tree | 367e361b99e10a565674bfeb510602af60637920 /main.go | |
parent | 2aea2d3d62e5df4c8bf25195dc97e60b495f6f12 (diff) |
exitcodes: specific codes for failure to read or write gocryptfs.conf
New codes:
* OpenConf = 23
* WriteConf = 24
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -52,7 +52,7 @@ func loadConfig(args *argContainer) (masterkey []byte, confFile *configfile.Conf fd, err := os.Open(args.config) if err != nil { tlog.Fatal.Printf("Cannot open config file: %v", err) - return nil, nil, err + return nil, nil, exitcodes.NewErr(err.Error(), exitcodes.OpenConf) } fd.Close() // The user has passed the master key (probably because he forgot the @@ -97,7 +97,7 @@ func changePassword(args *argContainer) { err = confFile.WriteFile() if err != nil { tlog.Fatal.Println(err) - os.Exit(exitcodes.Init) + os.Exit(exitcodes.WriteConf) } tlog.Info.Printf(tlog.ColorGreen + "Password changed." + tlog.ColorReset) os.Exit(0) |