fix: 解决数据库文件不存在时启用失败的问题 (#1544)

This commit is contained in:
ssongliu
2023-07-05 08:10:19 +00:00
committed by GitHub
parent 006c27fee5
commit 35334c1650
4 changed files with 12 additions and 6 deletions
+3 -3
View File
@@ -25,11 +25,11 @@ var userinfoCmd = &cobra.Command{
port := getSettingByKey(db, "ServerPort")
ssl := getSettingByKey(db, "SSL")
entrance := getSettingByKey(db, "SecurityEntrance")
enptrySetting := getSettingByKey(db, "EncryptKey")
encryptSetting := getSettingByKey(db, "EncryptKey")
p := ""
if len(enptrySetting) == 16 {
global.CONF.System.EncryptKey = enptrySetting
if len(encryptSetting) == 16 {
global.CONF.System.EncryptKey = encryptSetting
p, _ = encrypt.StringDecrypt(password)
} else {
p = password