fix:优化逻辑

This commit is contained in:
Mmx
2021-07-17 17:01:46 +08:00
parent 231a8a4cf7
commit f0c262a2b0
2 changed files with 2 additions and 8 deletions

View File

@@ -14,7 +14,7 @@ type daemon struct {
var Daemon = daemon{ var Daemon = daemon{
Mark: fmt.Sprint(time.Now().UnixNano()), Mark: fmt.Sprint(time.Now().UnixNano()),
Path: "autoLoginDaemon", Path: ".autoLoginDaemon",
} }
func init() { func init() {

View File

@@ -18,13 +18,7 @@ func (a *file) Exists(path string) bool {
return false return false
} }
_, err = os.Stat(root + path) _, err = os.Stat(root + path)
if err != nil { return err == nil || os.IsExist(err)
if os.IsExist(err) {
return true
}
return false
}
return true
} }
func (a *file) Read(path string) ([]byte, error) { func (a *file) Read(path string) ([]byte, error) {