@@ -4,12 +4,17 @@ import (
44	"context" 
55	"crypto/sha1" 
66	"fmt" 
7+ 	"io" 
8+ 	"net/url" 
9+ 	"path" 
10+ 	"strconv" 
11+ 	"time" 
12+ 
713	"github.com/alist-org/alist/v3/drivers/base" 
814	"github.com/alist-org/alist/v3/internal/driver" 
915	"github.com/alist-org/alist/v3/internal/model" 
1016	"github.com/alist-org/alist/v3/internal/op" 
1117	"github.com/alist-org/alist/v3/pkg/http_range" 
12- 	"github.com/alist-org/alist/v3/pkg/utils" 
1318	"github.com/aws/aws-sdk-go/aws" 
1419	"github.com/aws/aws-sdk-go/aws/credentials" 
1520	"github.com/aws/aws-sdk-go/aws/session" 
@@ -19,11 +24,6 @@ import (
1924	pubUserFile "github.com/city404/v6-public-rpc-proto/go/v6/userfile" 
2025	"github.com/rclone/rclone/lib/readers" 
2126	"github.com/zzzhr1990/go-common-entity/userfile" 
22- 	"io" 
23- 	"net/url" 
24- 	"path" 
25- 	"strconv" 
26- 	"time" 
2727)
2828
2929type  HalalCloud  struct  {
@@ -251,7 +251,6 @@ func (d *HalalCloud) getLink(ctx context.Context, file model.Obj, args model.Lin
251251
252252	size  :=  result .FileSize 
253253	chunks  :=  getChunkSizes (result .Sizes )
254- 	var  finalClosers  utils.Closers 
255254	resultRangeReader  :=  func (ctx  context.Context , httpRange  http_range.Range ) (io.ReadCloser , error ) {
256255		length  :=  httpRange .Length 
257256		if  httpRange .Length  >=  0  &&  httpRange .Start + httpRange .Length  >=  size  {
@@ -269,7 +268,6 @@ func (d *HalalCloud) getLink(ctx context.Context, file model.Obj, args model.Lin
269268			sha :     result .Sha1 ,
270269			shaTemp : sha1 .New (),
271270		}
272- 		finalClosers .Add (oo )
273271
274272		return  readers .NewLimitedReadCloser (oo , length ), nil 
275273	}
@@ -281,7 +279,7 @@ func (d *HalalCloud) getLink(ctx context.Context, file model.Obj, args model.Lin
281279		duration  =  time .Until (time .Now ().Add (time .Hour ))
282280	}
283281
284- 	resultRangeReadCloser  :=  & model.RangeReadCloser {RangeReader : resultRangeReader ,  Closers :  finalClosers }
282+ 	resultRangeReadCloser  :=  & model.RangeReadCloser {RangeReader : resultRangeReader }
285283	return  & model.Link {
286284		RangeReadCloser : resultRangeReadCloser ,
287285		Expiration :      & duration ,
0 commit comments