]> 127.0.0.1 Git - part/.git/commitdiff
fix v0.10.2
authorqydysky <32743305+qydysky@users.noreply.github.com>
Sat, 15 Oct 2022 19:04:25 +0000 (03:04 +0800)
committerqydysky <32743305+qydysky@users.noreply.github.com>
Sat, 15 Oct 2022 19:04:25 +0000 (03:04 +0800)
file/FileWR.go

index 6e237b1af9b5270b205f77f03217502e902c0bdf..b605a3c99e8eed2c1d97b808ed5411bc83cfd811 100644 (file)
@@ -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)
        }