summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/main.go b/main.go
index 2d7b50f..b29b2f6 100644
--- a/main.go
+++ b/main.go
@@ -122,8 +122,11 @@ func loadConfig(args *argContainer) (masterkey []byte, confFile *configfile.Conf
pw := readpassword.Once(args.extpass)
tlog.Info.Println("Decrypting master key")
masterkey, confFile, err = configfile.LoadConfFile(args.config, pw)
- if err != nil {
- tlog.Fatal.Println(err.Error())
+ if _, ok := err.(configfile.DeprecatedFsError); ok {
+ // Force read-only mode
+ args.ro = true
+ } else if err != nil {
+ tlog.Fatal.Println(err)
os.Exit(ERREXIT_LOADCONF)
}