fixbug
This commit is contained in:
parent
f87a25d75e
commit
82c2bf4e2b
|
|
@ -2,5 +2,6 @@
|
||||||
.git
|
.git
|
||||||
bindata.go
|
bindata.go
|
||||||
*.exe
|
*.exe
|
||||||
|
beancount-gs
|
||||||
gin.log
|
gin.log
|
||||||
config.json
|
config.json
|
||||||
BIN
beancount-gs
BIN
beancount-gs
Binary file not shown.
|
|
@ -209,11 +209,15 @@ func LoadLedgerConfigMap() error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if string(fileContent) != "" {
|
||||||
err = json.Unmarshal(fileContent, &ledgerConfigMap)
|
err = json.Unmarshal(fileContent, &ledgerConfigMap)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
LogSystemError("Failed unmarshal ledger_config file (" + path + ")")
|
LogSystemError("Failed unmarshal ledger_config file (" + path + ")")
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
ledgerConfigMap = make(map[string]Config)
|
||||||
|
}
|
||||||
LogSystemInfo("Success load ledger_config file (" + path + ")")
|
LogSystemInfo("Success load ledger_config file (" + path + ")")
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,13 @@ package script
|
||||||
import "os"
|
import "os"
|
||||||
|
|
||||||
func GetServerConfigFilePath() string {
|
func GetServerConfigFilePath() string {
|
||||||
return "./config/config.json"
|
currentPath, _ := os.Getwd()
|
||||||
|
return currentPath + "/config/config.json"
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetServerWhiteListFilePath() string {
|
func GetServerWhiteListFilePath() string {
|
||||||
return "./config/white_list.json"
|
currentPath, _ := os.Getwd()
|
||||||
|
return currentPath + "/config/white_list.json"
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetServerLedgerConfigFilePath() string {
|
func GetServerLedgerConfigFilePath() string {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue