]> 127.0.0.1 Git - part/.git/commitdiff
8
authorqydysky <qydysky@foxmail.com>
Mon, 27 Jul 2020 00:48:15 +0000 (08:48 +0800)
committerqydysky <qydysky@foxmail.com>
Mon, 27 Jul 2020 00:48:15 +0000 (08:48 +0800)
CheckFile.go

index c6c6d799fd5b5266780d59b259ec037504c7ccab..03e6c0390b1ae53678b7100715087db52b9cd4a7 100644 (file)
@@ -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()