mirror of
https://github.com/ehang-io/nps.git
synced 2026-11-01 01:02:12 +08:00
Windows服务运行npc时读取程序目录下的config文件
This commit is contained in:
1 parent
54743588bb
commit
d43cbde1f6
2 files changed
+12
-1
No files matched your search
@@ -76,3 +76,14 @@ func GetTmpPath() string {
|
||||
}
|
||||
return path
|
||||
}
|
||||
|
||||
//config file path
|
||||
func GetConfigPath() string {
|
||||
var path string
|
||||
if IsWindows() {
|
||||
path = filepath.Join(GetAppPath(), "conf/npc.conf")
|
||||
} else {
|
||||
path = "conf/npc.conf"
|
||||
}
|
||||
return path
|
||||
}
|
||||
Reference in new issue
Block a user