fix:优化逻辑
This commit is contained in:
@@ -14,7 +14,7 @@ type daemon struct {
|
||||
|
||||
var Daemon = daemon{
|
||||
Mark: fmt.Sprint(time.Now().UnixNano()),
|
||||
Path: "autoLoginDaemon",
|
||||
Path: ".autoLoginDaemon",
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
||||
@@ -18,13 +18,7 @@ func (a *file) Exists(path string) bool {
|
||||
return false
|
||||
}
|
||||
_, err = os.Stat(root + path)
|
||||
if err != nil {
|
||||
if os.IsExist(err) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
return true
|
||||
return err == nil || os.IsExist(err)
|
||||
}
|
||||
|
||||
func (a *file) Read(path string) ([]byte, error) {
|
||||
|
||||
Reference in New Issue
Block a user