From: qydysky <32743305+qydysky@users.noreply.github.com> Date: Sat, 15 Oct 2022 19:04:25 +0000 (+0800) Subject: fix X-Git-Tag: v0.10.2 X-Git-Url: http://127.0.0.1:8081/?a=commitdiff_plain;h=3fc5ba73e6f8f9868602565375725e842601080d;p=part%2F.git fix --- diff --git a/file/FileWR.go b/file/FileWR.go index 6e237b1..b605a3c 100644 --- a/file/FileWR.go +++ b/file/FileWR.go @@ -185,7 +185,7 @@ func (t *File) Close() error { func (t *File) getRWCloser() { if t.Config.AutoClose || t.file == nil { - if !t.isExist() { + if !t.IsExist() { if f, e := os.Create(t.Config.FilePath); e != nil { panic(e) } else { @@ -244,7 +244,7 @@ func transfer(r io.ReadCloser, w io.WriteCloser, byteInSec int64) (e error) { return nil } -func (t *File) isExist() bool { +func (t *File) IsExist() bool { if len(t.Config.FilePath) > 4096 { panic(ErrFilePathTooLong) }