From 9c91f062b93d57260076f8b5ce288ac3ba14d03a Mon Sep 17 00:00:00 2001 From: foxxorcat Date: Sun, 11 Sep 2022 13:18:29 +0800 Subject: [PATCH] fix(189pc): some minor problems --- drivers/189pc/help.go | 3 +-- drivers/189pc/utils.go | 8 +------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/189pc/help.go b/drivers/189pc/help.go index 52259397fd3..9babf73b535 100644 --- a/drivers/189pc/help.go +++ b/drivers/189pc/help.go @@ -78,8 +78,7 @@ func timestamp() int64 { } func MustParseTime(str string) *time.Time { - loc, _ := time.LoadLocation("Asia/Shanghai") - lastOpTime, _ := time.ParseInLocation("2006-01-02 15:04:05", str, loc) + lastOpTime, _ := time.ParseInLocation("2006-01-02 15:04:05 -07", str+" +08", time.Local) return &lastOpTime } diff --git a/drivers/189pc/utils.go b/drivers/189pc/utils.go index 2a67106e3af..6c559c1e85b 100644 --- a/drivers/189pc/utils.go +++ b/drivers/189pc/utils.go @@ -140,13 +140,7 @@ func (y *Yun189PC) getFiles(ctx context.Context, fileId string) ([]model.Obj, er fullUrl += "/listFiles.action" res := make([]model.Obj, 0, 130) - for pageNum := 1; pageNum < 100; pageNum++ { - select { - case <-ctx.Done(): - return nil, ctx.Err() - default: - } - + for pageNum := 1; ; pageNum++ { var resp Cloud189FilesResp _, err := y.get(fullUrl, func(r *resty.Request) { r.SetContext(ctx)