From 9e80d439d449965e5227a576c2c3b1f82170cba9 Mon Sep 17 00:00:00 2001 From: qydysky Date: Mon, 27 Jul 2020 08:48:15 +0800 Subject: [PATCH] 8 --- CheckFile.go | 2 ++ 1 file changed, 2 insertions(+) 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() -- 2.39.2