fix:修复Config.json可能被覆盖的致命bug

This commit is contained in:
Mmx
2021-05-07 13:45:35 +08:00
parent 40230b6c72
commit 393f60786a

View File

@@ -12,8 +12,8 @@ type file struct{}
var File file
func (*file) Exists(path string) bool {
_, err := os.Stat(path)
func (a *file) Exists(path string) bool {
_, err := os.Stat(a.GetRootPath() + path)
if err != nil {
if os.IsExist(err) {
return true