diff --git a/drivers/123/driver.go b/drivers/123/driver.go index 475e1d11..cf221fee 100644 --- a/drivers/123/driver.go +++ b/drivers/123/driver.go @@ -55,7 +55,7 @@ func (d *Pan123) Drop(ctx context.Context) error { } func (d *Pan123) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error) { - if f, ok := dir.(File); ok && f.IsLock == 1 { + if f, ok := dir.(File); ok && f.IsLock { if err := d.unlockSafeBox(f.FileId); err != nil { return nil, err } diff --git a/drivers/123/types.go b/drivers/123/types.go index 86525270..962e5fbd 100644 --- a/drivers/123/types.go +++ b/drivers/123/types.go @@ -20,7 +20,7 @@ type File struct { Etag string `json:"Etag"` S3KeyFlag string `json:"S3KeyFlag"` DownloadUrl string `json:"DownloadUrl"` - IsLock int `json:"IsLock"` + IsLock bool `json:"IsLock"` } func (f File) CreateTime() time.Time {