mirror of
https://github.com/ehang-io/nps.git
synced 2025-07-03 04:53:50 +00:00
merge
This commit is contained in:
commit
a4e7461f21
@ -139,8 +139,8 @@ func saveConfig(host, vkey, connType string) {
|
|||||||
logs.Warn("not found config dir")
|
logs.Warn("not found config dir")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
_ = os.Remove(ph + "npc.conf")
|
_ = os.Remove(path.Join(ph, "npc.conf"))
|
||||||
f, err := os.OpenFile(ph+"npc.conf", os.O_CREATE|os.O_WRONLY, 0644)
|
f, err := os.OpenFile(path.Join(ph, "npc.conf"), os.O_CREATE|os.O_WRONLY, 0644)
|
||||||
defer f.Close()
|
defer f.Close()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logs.Error(err)
|
logs.Error(err)
|
||||||
@ -159,7 +159,7 @@ func loadConfig() (host, vkey, connType string) {
|
|||||||
logs.Warn("not found config dir")
|
logs.Warn("not found config dir")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
f, err := os.OpenFile(ph+"npc.conf", os.O_RDONLY, 0644)
|
f, err := os.OpenFile(path.Join(ph, "npc.conf"), os.O_RDONLY, 0644)
|
||||||
defer f.Close()
|
defer f.Close()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logs.Error(err)
|
logs.Error(err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user