s3: fix url decoding of NextMarker - fixes #3799
Before this patch we were failing to URL decode the NextMarker when url encoding was used for the listing. The result of this was duplicated listings entries for directories with >1000 entries where the NextMarker was a file containing a space.
This commit is contained in:
parent
1ab4985046
commit
0ecb8bc2f9
1 changed files with 6 additions and 0 deletions
|
@ -1398,6 +1398,12 @@ func (f *Fs) list(ctx context.Context, bucket, directory, prefix string, addBuck
|
|||
} else {
|
||||
marker = resp.NextMarker
|
||||
}
|
||||
if urlEncodeListings {
|
||||
*marker, err = url.QueryUnescape(*marker)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "failed to URL decode NextMarker %q", *marker)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue