aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/configfile/config_file.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/configfile/config_file.go b/internal/configfile/config_file.go
index 4edf99d..31646ef 100644
--- a/internal/configfile/config_file.go
+++ b/internal/configfile/config_file.go
@@ -133,6 +133,9 @@ func Load(filename string, password []byte) ([]byte, *ConfFile, error) {
if err != nil {
return nil, nil, err
}
+ if len(js) == 0 {
+ return nil, nil, fmt.Errorf("Config file is empty")
+ }
// Unmarshal
err = json.Unmarshal(js, &cf)