From: qydysky Date: Mon, 27 Jul 2020 00:48:15 +0000 (+0800) Subject: 8 X-Git-Tag: v0.0.2~84 X-Git-Url: http://127.0.0.1:8081/?a=commitdiff_plain;h=9e80d439d449965e5227a576c2c3b1f82170cba9;p=part%2F.git 8 --- diff --git a/CheckFile.go b/CheckFile.go index c6c6d79..03e6c03 100644 --- a/CheckFile.go +++ b/CheckFile.go @@ -53,6 +53,8 @@ func (this *checkfile) IsExist(f string) bool { } func (this *checkfile) IsOpen(f string) bool { + if !this.IsExist(f) {return false} + fi,e:=os.OpenFile(f, syscall.O_RDONLY|syscall.O_EXCL, 0) if e!=nil {return true} fi.Close()